This is a simple REST API for managing tasks using Node.js and Express.js.
- GET /api/tasks β Returns a list of tasks
- POST /api/tasks β Adds a new task
- DELETE /api/tasks/:id β Deletes a task by ID
-
Clone the repository:
git clone https://github.com/TUSHAR-30/backend-task.git cd backend-task -
Install Dependencies:
npm install
-
Start the development server:
npm start
-
Open the app in your browser:
http://localhost:3000
- Get all tasks
curl -X GET http://localhost:3000/api/tasks- Add a new task:
curl -X POST http://localhost:3000/api/tasks -H "Content-Type: application/json" -d '{"name": "New Task", "completed": false}'- Delete a task:
curl -X DELETE http://localhost:3000/api/tasks/1This project is for evaluation purposes only.