For this project you need to have the following setups:
- Node.js → Server-Side JavaScript
- Express.js → Node Web Framework
- MongoDB → Database
- Mongoose → Database Structuring System
- Postman → used to test API with requests
I created a "models" folder in the repository. This will set how our database structure will be like.
-
POST /register - used to register.
-
POST /login - used to login.
-
PUT /user/:id - to update specific a user with unique Id
-
DELETE /user/:id - to delete a specific user with unique Id
-
GET /user/:id - to view a specific user with id.
-
GET /posts - to view all the posts.
-
POST /posts/ - to add a new post.
-
GET /posts/:id - to get a post with specific id
-
PUT /posts/:id - to update specific post with unique Id
-
DELETE /posts/:id - to delete specific post with unique Id
-
POST /category/ - to add a new category.
-
GET /category - to view all the categories.
It was used multer to upload file.
List of users
List of posts