This API allows users to create and manage a social network with features like creating profiles, creating posts, commenting on posts, and following other users. The API is built using NoSQL technologies and JavaScript.
- Node.js
- MongoDB
- Clone the repository to your local machine.
- Run
npm install
to install the required dependencies. - Start your MongoDB server.
- Run
npm start
to start the API server.
The API has the following endpoints:
POST /users
: Creates a new userGET /users/:id
: Gets a user by IDPUT /users/:id
: Updates a user by IDDELETE /users/:id
: Deletes a user by ID
POST /posts
: Creates a new postGET /posts
: Gets all postsGET /posts/:id
: Gets a post by IDPUT /posts/:id
: Updates a post by IDDELETE /posts/:id
: Deletes a post by ID
POST /comments
: Creates a new commentGET /comments
: Gets all commentsGET /comments/:id
: Gets a comment by IDPUT /comments/:id
: Updates a comment by IDDELETE /comments/:id
: Deletes a comment by ID
POST /follow
: Follows another userDELETE /follow/:id
: Unfollows a user