https://github.com/moaraby/to-do-list-nodejs
REST API APP
https://github.com/moaraby/to-do-list-nodejs
docker dotenv error-handler expressjs mongodb mongoose nodejs nodemon restful-api
Last synced: 12 days ago
JSON representation
REST API APP
- Host: GitHub
- URL: https://github.com/moaraby/to-do-list-nodejs
- Owner: MoARABY
- Created: 2024-04-12T20:38:48.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T10:38:10.000Z (about 2 years ago)
- Last Synced: 2025-01-01T18:43:31.342Z (over 1 year ago)
- Topics: docker, dotenv, error-handler, expressjs, mongodb, mongoose, nodejs, nodemon, restful-api
- Language: JavaScript
- Homepage: https://to-do-list-nodejs-zwux.onrender.com
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
toDoList - Backend
This repository contains the backend code for a toDoList built using Node.js, Express, and MongoDB.
Features
CRUD operations for managing tasks
Middleware for request validation and error handling
Separation of concerns using controllers, models, and routes
Technologies Used
- Node.js
- Express.js
- Docker
- MongoDB
- dotenv
- express-async-handler
- mongoose
- nodemon
Setup Instructions
- >Clone the repository:
- >> bash
- >> git clone https://github.com/your-username/to-do-list-nodeJS.git
Install dependencies:
- > bash
- > cd contact-management-backend
- > npm install
- > Create a .env file in the root directory.
- > Add the following environment variables:
- >> makefile
- >> PORT=3000
- >> MONGODB_URI=your-mongodb-connection-string
Configure environment variables:
- > Start the server:
- >> bash
- >> npm start
API Endpoints
- GET /api/tasks: Get all tasks
- POST /api/tasks: Create a new task
- GET /api/tasks/:id: Get a task by ID.
- PUT /api/tasks/:id: Update a task by ID.
Folder Structure
- middlewares/: Custom middleware functions.
- controllers/: Request handlers for each route.
- models/: Mongoose schemas and models.
- routes/: Express routes for different endpoints.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request.
License
This project is licensed under the MIT License.