This is a TodoApp API built with NestJS and MongoDB. It provides endpoints for managing your todo items.
- Node.js (v14+)
- MongoDB
- NestJS
-
Clone the repository:
git clone https://github.com/adarsh-2425/TodoApp-Nestjs.git cd your-todoapp-api
-
Install dependencies:
npm i
-
Configure your MongoDB connection in src/config/keys.ts.
-
Start the server
npm start
- URL: /todo
- Method: GET
- Description: Get a list of all todos.
- Response: JSON array of todo items.
- URL: /todo/:id
- Method: GET
- Description: Get a specific todo by its ID.
- Response: JSON object of the todo item.
- URL: /todo
- Method: POST
- Description: Create a new todo item.
- Request Body: JSON object with todo details.
- Response: JSON object of the created todo item.
- URL: /todo/:id
- Method: PUT
- Description: Update a specific todo by its ID.
- Request Body: JSON object with updated todo details.
- Response: JSON object of the updated todo item.
- URL: /todo/:id
- Method: DELETE
- Description: Delete a specific todo by its ID.
- Response: JSON object with a message indicating success.
If you would like to contribute to this project, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.