Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dunghenry/api_todos
Backend todos
https://github.com/dunghenry/api_todos
body-parser cors expressjs mongodb-atlas nodemon restful-api
Last synced: about 1 month ago
JSON representation
Backend todos
- Host: GitHub
- URL: https://github.com/dunghenry/api_todos
- Owner: dunghenry
- Created: 2022-05-12T09:20:36.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-17T09:56:34.000Z (3 months ago)
- Last Synced: 2024-09-18T07:16:07.867Z (3 months ago)
- Topics: body-parser, cors, expressjs, mongodb-atlas, nodemon, restful-api
- Language: JavaScript
- Homepage:
- Size: 133 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
I, Setup and config MVC:
1.Create folder express-todos
2.cd express-todos
3.npm init -y
4.npm i express helmet cors morgan dotenv mongoose nodemon body-parser
5.create folder src6. cd src and create foler controlers, models, routes, heplers, config,
create file index.js and .envII, Use API
1.Get all todo
> GET /api/v1/todos
2.Get todo by id
> GET /api/v1/todos/:id3.Create todo
> POST /api/v1/todos
4.Update todo by id
> PUT /api/v1/todos/:id
5.Delete todo by id
> DELETE /api/v1/todos/:id