Node JS

JWT

JWT means JSON Web Token. Its used to share secretly information between to parties client and server.JWT use as a secure way to authentication share user information. JWT mechanism to verify the owner of JSON.

How JWT Tok…


This content originally appeared on DEV Community and was authored by Munni

JWT

JWT means JSON Web Token. Its used to share secretly information between to parties client and server.JWT use as a secure way to authentication share user information. JWT mechanism to verify the owner of JSON.

How JWT Token Work?

JWT token based authentication, and its stateless. That means the user state is never saved in server memory but the state is sorted inside the token . JWT request to other parties.

JWT have of 3 parts .

  1. Header
  2. Payload
  3. Signature

JWT Look Likes

Aaaaaaaaaa.bbbbbbbbbbbbb.cccccccccccc
The first part is header and second part is payload and the last part is signature.

Mongoose

Mongoose is a mongodb ODM (object database modeling). Mongoose is a way to make connection mongodb database. It provide mongodb validation. Its very simple and it make development first. And it includes query , validation, and logic hook.

It work in asynchronous environment .

Installation mongoose :
npm install mongoose

CRUD Operation

Crud are the four basic operation its create , read, update, delete. The crud operation is refers to the major operation which are implement by database. It can also describe the user interface convention that allow searching , modifying .

Create
The create function allows to user record create in the database. The create function is called INSERT.

Read
The read function is search specific function and read there value.

Update
The update function is modify existing record that exist in database.

Delete
The delete function allows user to remove record in the database.

Express of Node JS

Express js is a back end web application framework for node js. It’s a free and open source .
It designed for building web application and API.

Following are some of the core feature of express framework:
• Respond HTTP request
• Allows the middleware
• Allows to dynamically render to HTML pages.

Installation command :
npm install express

Example:
const express= require(“express”);
const app = express();


This content originally appeared on DEV Community and was authored by Munni


Print Share Comment Cite Upload Translate Updates
APA

Munni | Sciencx (2021-12-23T15:11:39+00:00) Node JS. Retrieved from https://www.scien.cx/2021/12/23/node-js/

MLA
" » Node JS." Munni | Sciencx - Thursday December 23, 2021, https://www.scien.cx/2021/12/23/node-js/
HARVARD
Munni | Sciencx Thursday December 23, 2021 » Node JS., viewed ,<https://www.scien.cx/2021/12/23/node-js/>
VANCOUVER
Munni | Sciencx - » Node JS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/23/node-js/
CHICAGO
" » Node JS." Munni | Sciencx - Accessed . https://www.scien.cx/2021/12/23/node-js/
IEEE
" » Node JS." Munni | Sciencx [Online]. Available: https://www.scien.cx/2021/12/23/node-js/. [Accessed: ]
rf:citation
» Node JS | Munni | Sciencx | https://www.scien.cx/2021/12/23/node-js/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.