This is Nodejs-express project. Which is implemented to learn the fundamentals of express. In this project we make the server using express and having api. We also implemented the the crud operation using mongodb
- /todolist/tasks - sned get req to get all the task
- /todolist/tasks - sned post req to create the task
- /todolist/tasks:id - send get req to fetch task with respective id
- /todolist/tasks:id - send put req to update task with respective id
- /todolist/tasks:id - send delete req to delete task with respective id
{
"taskName": "sleep"
}
{
"taskName": "sleep",
"status": "completed"
}
├── app.js
├── config.env
├── controllers
│ └── taskController.js
├── models
│ ├── mongoConnection.js
│ ├── taskSchema.js
│ ├── todoAdapaterModel.js
│ └── todoMongoCrud.js
├── package.json
├── package-lock.json
├── routes
└── todoRoutes.js
Install the dependencies and start the server.
- vscode editor
- node js installed
- npm installed
-
clone this project
-
go into to the the project folder
-
open the terminal
-
open vscode using following command
$ code .
-
Install the dependencies
$ npm install
-
run the project
$ npm run start