Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 860 Bytes

README.md

File metadata and controls

51 lines (42 loc) · 860 Bytes

Todo Backend API

A RESTful API backend service for managing todo tasks, built with Node.js.

Setup

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Create a .env file with the following variables:
PORT=3000
MONGODB_URI=your_mongodb_connection_string
  1. Start the server:
npm start

API Endpoints

Tasks

  • GET /api/tasks - Get all tasks
  • POST /api/tasks - Create a new task
  • GET /api/tasks/:id - Get a specific task
  • PUT /api/tasks/:id - Update a task
  • DELETE /api/tasks/:id - Delete a task

Request/Response Examples

Create Task

POST /api/tasks
{
  "title": "Complete project",
  "description": "Finish the todo API implementation",
  "dueDate": "2024-01-20",
  "status": "pending"
}

Technologies

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose

License

MIT