Skip to content

MoARABY/to-do-list-nodeJS

Repository files navigation

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

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.

Releases

No releases published

Packages

 
 
 

Contributors