This is a REST API based on Node Js, Express, Mongodb with mongoose, email verification, swagger documentation and tests with Mocha and Chai and a secure JWT authentication and deals with managing users.
- NodeJs installed. Download it
- PostgreSQL installed. Download it
- Text Editor of your choice. My recommendation
- ✔ User(any) should be able to register and verify email
- ✔ User(any) should be able to login into his/her account
- ✔ User(logged in) should be able to see all users on the app
- ❌ User(logged in) should be able to logout of his/her account
- ✔ User(logged in) should be able to get all details of any User
Run the following commands
npm install
touch .env
Copy all content from .env.example
file to .env
file then fill it with proper info
Run npm run dev
to start the server in development or
Run npm start
for production mode
[GET] /api/v1/users
:body: none
[POST] /api/v1/users/login
:body: {
email "STRING",
password "STRING"
}
[POST] /api/v1/users/signup
:body: {
name "STRING",
password "STRING",
email "STRING",
}
- bcryptjs
- Node JS
- Express JS
- jsonwebtoken
- mocha & chai
- MongoDB with Mongoose