Skip to content

tiago-play/API-TODO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API-TODO

Project CRUD, API Rest Node with Express and MongoDB Atlas.

Deployed in Heroku, URL for test online > https://dashboard.heroku.com/apps/todo-app-nodejs-tiago-play

If you prefer you can dowload the project in your computer, in both cases it's necessary use an API clients like Insomnia or Postman
Script to run the project: npm run dev

Dependencies used at this project: Cors, Dotenv, Express, Mongoose
Dev Dependencies: Nodemon

You can test the follow routes:

Create and login User: /session
Method: Post
It's necessary to create the user and copy the user_id
Requisition body (type json):
{"username": "[email protected]"}

Now for the next routes we simulated like the user are logged in.
Only the user_id who created the todo can execute the methods.

Create todo: /todo/:user_id
Method: Post
Example of requisition body { "description": "test", "done": true }

Get todo: /todo/:user_id
Method: Get
Hans't body

Update todo: /todo/:user_id
Method: Patch
Example of requisition body: { "description": "write the readme file", "done": false }

Delete todo /todo/:user_id/:todo_id
Method: Delete
Hans't body

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published