A RESTful API for managing todos, built with Node.js, Express, and MongoDB.
- Create, read, update, and delete todos (CRUD operations)
- Clear and concise API endpoints
- Error handling and informative error messages
- Basic data validation
-
Clone this repository:
git clone https://github.com/renjithroy/todo-backend.git
-
Install dependencies:
cd todo-backend npm install
-
Start the development server:
npm start
-
The server will start running on port 3000.
Base URL: http://localhost:3000/todos
Method | Endpoint | Description |
---|---|---|
GET | / |
Retrieve all todos |
GET | /:id |
Retrieve a todo by ID |
POST | / |
Create a new todo |
PATCH | /:id |
Update a todo by ID |
DELETE | /:id |
Delete a todo by ID |
{
"todoId": 1,
"todoDesc": "Learn pointers in C++",
"isDone": false
}
Happy Organizing!