https://github.com/lahi-ru/task-manager-api
Build a REST API that allows users to create tasks, view their tasks, update their tasks, mark tasks as completed and delete tasks
https://github.com/lahi-ru/task-manager-api
apidevelopment task-management
Last synced: 10 months ago
JSON representation
Build a REST API that allows users to create tasks, view their tasks, update their tasks, mark tasks as completed and delete tasks
- Host: GitHub
- URL: https://github.com/lahi-ru/task-manager-api
- Owner: LAHI-RU
- License: mit
- Created: 2025-04-25T13:58:43.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-05-06T02:00:45.000Z (10 months ago)
- Last Synced: 2025-05-07T06:15:05.118Z (10 months ago)
- Topics: apidevelopment, task-management
- Language: JavaScript
- Homepage:
- Size: 3.38 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Task Manager API
A simple REST API for managing tasks built with Node.js, Express, and MongoDB.
## Features
- Create, read, update, and delete tasks
- Store tasks in MongoDB database
- RESTful architecture
## Technologies Used
- Node.js
- Express.js
- MongoDB
- Mongoose
## Installation
1. Clone this repository
```
git clone https://github.com/yourusername/task-manager-api.git
```
2. Install dependencies
```
cd task-manager-api
npm install
```
3. Create a `.env` file in the root directory
```
PORT=5000
MONGO_URI=your_mongodb_connection_string
```
4. Start the server
```
npm run dev
```
## API Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/tasks | Get all tasks |
| POST | /api/tasks | Create a new task |
| GET | /api/tasks/:id | Get a specific task by ID |
| PUT | /api/tasks/:id | Update a task |
| DELETE | /api/tasks/:id | Delete a task |
## Request Examples
### Create a task
```
POST /api/tasks
Content-Type: application/json
{
"title": "Complete project",
"description": "Finish the task manager API project"
}
```
### Update a task
```
PUT /api/tasks/60d21b4667d0d8992e610c85
Content-Type: application/json
{
"completed": true
}
```
## License
MIT
## Author
LAHIRU