Clone this repository and run npm install
to install all the packages
Start the server by running npm run dev
You must have jest installed to run the test
Three levels of users is implemented i.e (admin, merchant, customer), and there are 3 user already created for testing the authentication and authorization part. Although another users can be created for testing also.
Email: admin@perdiem.co password: pass1234
Email: merchant@perdiem.co password: pass1234
Email: customer@perdiem.co password: pass1234
Jsonwebtoken(jwt) is one of the most popular, widely used for authentication and authorization with nodejs. What's make it so sine is that when we issue a jwt for a logged in user, all subsequent request will contain the jwt along with them. And with this it's makes it more use in building Restful API for authentication and authorisation because it allows one of the guiding principles for building Restful API which is been STATELESS i.e all the request from client to server and server to client will contain all the necessary information to understand that request.