manzil-infinity180 / Assignment-TodoList

PR: NODEJSIIP-01909

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Documentation - https://documenter.getpostman.com/view/27140962/2s9YytgLLr
Video Demo - DEMO

Starting the Server

To start the backend server, follow these steps:

Step 1: Install Dependencies

  • Run npm install to install the required dependencies for the backend.

Step 2: Start the Server

  • Run npm start to launch the server using Nodemon, which automatically restarts the server when changes are made. If you don't have Nodemon installed, you can do so globally by running npm i -g nodemon
  • Prod : npm run start
  • Dev : npm run dev

**Step 3: Setup Dependency **

  • Replace the crediatals with your creaditals in config.env file (for reference i added my own creditals)
DATABASE = mongodb+srv://YOUR_USERNAME:<PASSWORD>@cluster0.bsvhsqp.mongodb.net/?retryWrites=true&w=majority
PASSWORD = YOUR_PASSWORD
PORT = 3003

Create a Task

  • Endpoint: http://localhost:3003/api/v1/create-task
  • Description: Create your task with title and description
  • Body:
{
    "title":"Nodejs",
    "description":"itegrate mongosb indexes and geosptail feature with Nodejs api"
    
}
Create.a.Task.mov

Update a Task

  • Endpoint: http://localhost:3003/api/v1/update-task/:id
  • Description: Update a task such as title , description and done(status of task) , if task is true then you can not do again as true but you can change it to false and doint true of done(status) automatically, categories as completed
  • Body:
{
    
     "done":true
    
}
  • when done(status) is true
Update.when.status.is.Already.TRUE.mov
Update.a.Task.mov

Get all Task

  • Endpoint: http://localhost:3003/api/v1/all-task or http://localhost:3003/api/v1/all-task?categories=not-completed
  • Description: Get your all task and also you can query using categories as completed or not-completed
Get.your.all.task.mov

Delete a Task

  • Endpoint: http://localhost:3003/api/v1/delete-task/:id
  • Description: Delete your task
Delete.a.task.mov

Unit Testing

  • Run the test - npm run test
Screenshot 2024-02-01 at 12 07 51 AM

About

PR: NODEJSIIP-01909


Languages

Language:JavaScript 100.0%