This repository contains the code for the Todo API project. The project aims to provide a RESTful API for managing todo items. It allows users to create, update, delete, and retrieve todo items.
Before running the project, ensure that you have the following prerequisites installed:
- Node.js (version >= 16.0.0)
- npm (Node Package Manager)
- MongoDB (or a MongoDB instance to connect to)
- Clone the repository to your local machine using the following command:
git clone https://github.com/Aashish-Kaushik/Todo-app.git
- Navigate to the project directory:
cd todo-app
- Install the required dependencies:
npm install
To start the API server, use the following command:
npm start
The API server will start running on http://localhost:3000
.
Make sure to update the MongoDB connection settings in the config.js
file to match your MongoDB instance.
The following are the available API endpoints:
Endpoint | Method | Description |
---|---|---|
/api/v1/tasks/ |
GET | Get a list of all todo items |
/api/v1/tasks/ |
POST | Create a new todo item |
/api/v1/tasks/:id |
GET | Get details of a specific todo item |
/api/v1/tasks/:id |
PATCH | Update a specific todo item |
/api/v1/tasks/:id |
DELETE | Delete a specific todo item |
Please refer to the API documentation or the source code for detailed information on request and response payloads.
Contributions to the Todo API project are welcome. To contribute, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push the changes to your forked repository.
- Submit a pull request describing your changes.