https://github.com/benevanio/task-app
https://github.com/benevanio/task-app
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/benevanio/task-app
- Owner: Benevanio
- Created: 2025-03-30T20:21:38.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-04-07T01:01:04.000Z (6 months ago)
- Last Synced: 2025-04-07T02:21:32.862Z (6 months ago)
- Language: JavaScript
- Size: 468 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Task App
A simple task management application built with Node.js, Express, and MongoDB.
## Getting Started
To get started with this project, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/Benevanio/task-app.git
```2. Install dependencies:
```bash
cd task-app
npm install
```3. Create a `.env` file in the root directory and add your MongoDB connection URL and port:
```
MONGO_URL=
PORT=
```4. Start the server:
```bash
npm start
```Now you can access the application at `http://localhost:`.
## API Endpoints
The following API endpoints are available:
- `GET /`: Returns a welcome message.
- `POST /tasks`: Creates a new task.
- `GET /tasks`: Retrieves all tasks.
- `GET /tasks/:id`: Retrieves a specific task by ID.
- `PATCH /tasks/:id`: Updates a specific task by ID.
- `DELETE /tasks/:id`: Deletes a specific task by ID.## Example Usage
To create a new task, send a POST request to `http://localhost:/tasks` with the following JSON payload:
```json
{
"description": "Complete the task app",
"completed": false
}
```To retrieve all tasks, send a GET request to `http://localhost:/tasks`.
To retrieve a specific task by ID, send a GET request to `http://localhost:/tasks/:id`.
To update a specific task by ID, send a PATCH request to `http://localhost:/tasks/:id` with the updated JSON payload.
To delete a specific task by ID, send a DELETE request to `http://localhost:/tasks/:id`.
## Contributing
Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request.
## License
This project is licensed under the MIT License.
## Acknowledgments
This project was built as part of a Node.js course.