Skip to content

gh-aam/task-management-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management API

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.

Features

  • 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

Installation

Clone the repository:

git clone https://github.com/gh-aam/task-management-api.git

Go to project directory:

cd task-management-api

Install dependencies:

npm install

Usage

Start the server:

npm start

Or start in development mode (with hot-reloading via nodemon):

npm run dev

The server will start on http://localhost:3000.

API Endpoints

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

About

A simple task management (RESTful) API built with Express.js.

Topics

Resources

License

Stars

Watchers

Forks