This is a simple RESTful Task Manager API built using Node.js and Express.
It stores data in memory (no database), uses UUIDs for unique task IDs, and supports full CRUD operations.
- β
Create a task (
POST /tasks
) - β
Get all tasks (
GET /tasks
) - β
Get a single task by ID (
GET /tasks/:id
) - β
Update a task (
PUT /tasks/:id
) - β
Delete a task (
DELETE /tasks/:id
) - β
Validation for
title
andstatus
- β Middleware to log all incoming requests
- β
Bonus: Filter tasks by status (
?status=pending
) - β
Bonus: Sort tasks by creation time (
?sortBy=createdAt:desc
)
Each task looks like this:
{
"id": "uuid",
"title": "Learn Node.js",
"description": "Optional text",
"status": "pending", // or "completed"
"createdAt": "2025-07-15T12:00:00Z"
}
- Clone the repo:
git clone https://github.com/salmanazamdev/task-manager-api.git
cd task-manager-api
- Install dependencies:
npm install
- Start the server:
node index.js
Your API will be running at:
http://localhost:3000
POST /tasks
Body (raw JSON):
{
"title": "Do assignments",
"description": "Complete backend API",
"status": "pending"
}
- All data is stored in memory (resets on server restart)
- This project is meant for learning REST APIs using Express
- Perfect for practice or beginner backend portfolio projects
Made with β€οΈ by Salman
Feel free to fork, use, and improve!