Give this command in terminal and then change the MonogDb url in index.js and you are set to go
The base URL for all API endpoints is http://localhost:4000.
- Endpoint:
/users - Method:
POST - Description: Create a new user.
- Request Body:
name(string, required): The user's name.email(string, required): The user's email address.username(string, required): The user's username.
- Endpoint:
/users/:id - Method:
GET - Description: Retrieve a user by their unique identifier.
- URL Parameters:
id(string)
- Endpoint:
/users - Method:
GET - Description: Retrieve a list of all users.
- Endpoint:
/users/:id - Method:
PUT - Description: Update a user's information.
- URL Parameters:
id(string)
- Request Body:
- Body:
name(string): The updated user's name (optional).email(string): The updated user's email address (optional).username(string): The updated user's password (optional).
- Body:
- Endpoint:
/users/:id - Method:
DELETE - Description: Delete a user by their unique identifier.
- URL Parameters:
id(string)