It validates the user data for registration and login using joi validation and lets user access the home route if they are logedIn with a verified token generated by json wen token.
This validates the user data for registration and login using joi validation and lets user access the home route if they are logedIn with a verified token generated by json wen token.
This API has 3 routes :-
git clone https://github.com/payalpatra/Nodejs-API-Auth.git
npm install
DB_CONNECT =mongodb+srv://<USERNAME>:<PASSWORD>@cluster0.ifcel.mongodb.net/<DBNAME>?retryWrites=true&w=majority
TOKEN_SECRET= thisIsTheToken
nodemon index