- Install the following modules:
$ npm init $ npm install express --save $ npm install mongoose --save $ npm install morgan --save $ npm install body-parser --save $ npm install jsonwebtoken --save
 - File structure would be like :
- package.json
 - config.js
 - server.js
 - models/user.js
 
 - First comment off the route middleware code
 - Then navigate to this route(/api/setup) in postman, then run this route(/api/authenticate) and copy the token.
 - Uncomment the route middleware code.
 - Now try to access other routes that is defined.
 
- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
rupachowrasia/node-authentication-jwt
Folders and files
| Name | Name | Last commit message  | Last commit date  | |
|---|---|---|---|---|
Repository files navigation
About
NodeJS authentication using JWT
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
              Packages 0
        No packages published