This repo is Auth Node.js Api [Backend Server]
$ git clone https://github.com/devkishor8007/auth_node_api.git # or clone your own fork
$ cd node_auth_api
$ npm i
$ npm i -g nodemon
create a .env file then type
MONGO_URL=<yourMongoDBURlLink>
SECRET=<yours_secret_key>
$ nodemon index.js
Note: Before doing $ nodemon index.js
, you must do one thing that is Open the Redis Server and if you have not Redis DB in your system then do download.
Your app should now be running on localhost:5000
For the login User Data || You need the token [Check in Postman] as Header("x-auth-token" : <token_key>);
http://localhost:5000/
http://localhost:5000/login
http://localhost:5000/logout
Note: You must have install the Redis in your OS.
Node.js Guide
Express.js Guide
Mongoose Guide
MongoDb Guide
Redis Guide