Skip to content

sumilraweng/nodejs-todo-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo backend

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

LIST Of API

  • /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

send the post request in following manner

example to send create task body in json:

{
  "taskName": "sleep"
}

example to send update task body in json:

{
  "taskName": "sleep",
  "status": "completed"
}

folder structure

├── app.js
├── config.env
├── controllers
│   └── taskController.js
├── models
│   ├── mongoConnection.js
│   ├── taskSchema.js
│   ├── todoAdapaterModel.js
│   └── todoMongoCrud.js
├── package.json
├── package-lock.json
├── routes
    └── todoRoutes.js

Installation

Install the dependencies and start the server.

prerequisite

  1. vscode editor
  2. node js installed
  3. npm installed

steps

  1. clone this project

  2. go into to the the project folder

  3. open the terminal

  4. open vscode using following command

$ code .
  1. Install the dependencies

$ npm install
  1. run the project

$ npm run start

Link to server

Todo-backend-server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages