Skip to content

sulav-pradhan/todo-app

Repository files navigation

todo-app

Setup Docs For Todo-app

Step 1:

Clone the repository:
https://github.com/sulavpradhan/todo-app-api.git

Step 2:

Enter the project directory and install all the dependencies using npm or yarn. npm i or yarn

Step 3:

Set the environment variables. Use the .env.example file as a refrence for creating the env file.

Step 4:

Use the command yarn start or npm start to start the server.

Step 5:

Go to url http://localhost:3030/api/v1/todo/get-todo to see the website.

API Documentation

get-todo

Request type: GET
Route: /todo/get-todo
This API renders a page that shows all the todos.

get-done-todo

Request type: GET
Route:/todo/get-done-todo
This API renders a page that shows all the todos that have been completed.

get-upcomming-todo

Request type: GET
Route:/todo/get-upcomming-todo
This API renders a page that shows all the todos of the future.

create-todo

Request type: POST
Route: /todo/create-todo
This API allows the user to save new todos.
The body of the request must contain all the data regarding the todo. It should look something like this. {name:"todo name",desription:"todo description",date:"2023-11-11T20:20"}
The date must be greater than the current date.

update-todo

Request type: POST
Route: /todo/update-todo
This API allows the user to make changes to existing todos.
The id of the todo to be edited must be in the query parameters of the request as _id. {_id:"todo id"}
The updates to the todo must be in the body of the request. Let us consider that you want to change the name of the todo then the body will look something like this:
{name:"new name"}

delete-todo

Request type: POST
Route: /todo/delete-todo/:id
This API allows the user to delete existing todos.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published