A simple RESTful Task Management API built with Express.js. This project provides a basic in-memory CRUD (Create, Read, Update, and Delete) API for managing various tasks.
- List all tasks
- View a specific task by ID
- Create a new task
- Update an existing task
- Delete a task
- Logs incoming HTTP requests
- Validates task creation input
Clone the repository:
git clone https://github.com/gh-aam/task-management-api.gitGo to project directory:
cd task-management-apiInstall dependencies:
npm installStart the server:
npm startOr start in development mode (with hot-reloading via nodemon):
npm run devThe server will start on http://localhost:3000.
GET / - Welcome message
GET /tasks - Returns a list of all tasks
GET /tasks/:id - Returns a task by ID
POST /tasks - Creates a new task (Requires a JSON body)
{
  "title": "New Task",
  "completed": false
}PUT /tasks/:id - Updates an existing task by ID (Requires a JSON body)
{
  "completed": true
}DELETE /tasks/:id - Deletes a task by ID