/node-jwt-basics

API for authentication using JWT

Primary LanguageJavaScript

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>