Skip to content

nitin01010/Advance_Task_Manager_Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—„οΈ Backend - Advanced Task Manager App (MERN)

This is the Backend API for the Advanced Task Manager App.
Built with Node.js, Express.js, MongoDB, and Mongoose, following clean MVC architecture.


πŸš€ Tech Stack (Backend)

  • Node.js
  • Express.js
  • MongoDB + Mongoose
  • dotenv (environment variables)
  • cors (API access control)
  • nodemon (development auto-restart)

πŸ“‚ Folder Structure

Backend/ │── controllers/ β”‚ └── taskControllers.js # All task CRUD logic │── Lib/ β”‚ └── dbConnection.js # MongoDB connection │── Modules/ β”‚ └── taskModule.js # Mongoose schema/model │── Routes/ β”‚ └── task.js # Routes definitions │── .env # Environment variables │── index.js # Server entry point │── package.json


βš™οΈ Setup & Installation

npm install

MONGO_URI= PORT=5000

Server runs by default on: http://localhost:5000

Method Endpoint Description
GET /api/v1/tasks Get all tasks
POST /api/v1/tasks Create a new task
PUT /api/v1/tasks/:id Update task
DELETE /api/v1/tasks/:id Delete task
PATCH /api/v1/tasks/:id/toggle update Pendding true and false task

βœ… Features

βœ”οΈ RESTful API βœ”οΈ Full CRUD operations βœ”οΈ MongoDB storage βœ”οΈ Async/await + try/catch error handling βœ”οΈ No empty fields validation βœ”οΈ Modular folder structure (MVC) βœ”οΈ Includes CORS support βœ”οΈ Auto restart with Nodemon

{ "_id": "65a5f3c21b23c1a9b8e9d123", "task": "Complete assignment", "completed": false, "createdAt": "2024-01-15T10:30:01.123Z" }

πŸ§ͺ Testing Routes

You can test routes using:

Postman

Thunder Client (VS Code)

cURL

Frontend client

Example (POST):

POST http://localhost:5000/api/tasks Content-Type: application/json

{ "title": "Learn MERN Stack" }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors