Skip to content

ashishbhatiam/node-jwt-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup

In order to avoid port collisions, in the source code port value is 5001

Node JWT-Basics

API for authentication using JWT

Install

npm install

Running

npm start

Base url

http://localhost:5001

Routes

router.post("/api/v1/login");

router.get("/api/v1/dashboard");

Note

Add a .env file to the root of your project with the following content:

JWT_SECRET = <secret code>