API Documentation - https://documenter.getpostman.com/view/27140962/2s9YytgLLr
Video Demo - DEMO
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 runningnpm 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
- 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
- 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 ascompleted
- Body:
{
"done":true
}
- when done(status) is true
Update.when.status.is.Already.TRUE.mov
Update.a.Task.mov
- Endpoint:
http://localhost:3003/api/v1/all-task
orhttp://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
- Endpoint:
http://localhost:3003/api/v1/delete-task/:id
- Description: Delete your task
Delete.a.task.mov
- Run the test -
npm run test
![Screenshot 2024-02-01 at 12 07 51 AM](https://private-user-images.githubusercontent.com/119070053/301270158-b23adc4a-4b2c-4482-9c11-5ea98c964025.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIyNjkyMTMsIm5iZiI6MTcyMjI2ODkxMywicGF0aCI6Ii8xMTkwNzAwNTMvMzAxMjcwMTU4LWIyM2FkYzRhLTRiMmMtNDQ4Mi05YzExLTVlYTk4Yzk2NDAyNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyOVQxNjAxNTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZjZhMDIzZThiZWI4NmQ2MGFlYzJmZGNlN2U4NDM1OGFlYTk2OWMxN2NkODkzYmRmM2ZhODI4NzI3OGQ4NDk3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.WYT77FH9URxMq_j07y_CTSY0twY0XVCPmsEiDOZfglM)