https://github.com/gh-aam/task-management-api
A simple task management (RESTful) API built with Express.js.
https://github.com/gh-aam/task-management-api
api express express-middleware expressjs javascript javascript-framework rest-api restful-api
Last synced: about 2 months ago
JSON representation
A simple task management (RESTful) API built with Express.js.
- Host: GitHub
- URL: https://github.com/gh-aam/task-management-api
- Owner: gh-aam
- License: mit
- Created: 2025-05-22T06:08:29.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-22T13:21:58.000Z (about 1 year ago)
- Last Synced: 2025-06-17T19:42:52.874Z (about 1 year ago)
- Topics: api, express, express-middleware, expressjs, javascript, javascript-framework, rest-api, restful-api
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```bash
git clone https://github.com/gh-aam/task-management-api.git
```
Go to project directory:
```bash
cd task-management-api
```
Install dependencies:
```bash
npm install
```
## Usage
Start the server:
```bash
npm start
```
Or start in development mode (with hot-reloading via `nodemon`):
```bash
npm run dev
```
The server will start on [http://localhost:3000](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)
```json
{
"title": "New Task",
"completed": false
}
```
`PUT /tasks/:id` - Updates an existing task by ID (Requires a JSON body)
```json
{
"completed": true
}
```
`DELETE /tasks/:id` - Deletes a task by ID