/crud-api-express-mongo

A backend application using Express.js framework and MongoDB database.

Primary LanguageJavaScript

CRUD API w/ Express.js and MongoDB

A backend application using Node.js with the Express framework, that implements a simple CRUD with the MongoDB.


Stack

Lib Version
express 4.16.4
mongoose 5.4.17

Running

After clone

$ cd crud-api-express-mongo
$ npm install

Starting the application

$ npm start

or

$ node index.js

Routes

  • New to-do item
method: "POST"
url: "/server/to-do/new"
body: {
    "description": <String>
}
  • Edit a to-do item
method: "PUT"
url: "/server/to-do/edit-description/:ID"
body: {
    "description": <String>
}
  • Set a to-do item as done
method: "PUT"
url: "/server/to-do/set-as-done/:ID"
  • Set a to-do item as pending
method: "PUT"
url: "/server/to-do/set-as-pending/:ID"
  • Delete a to-do item
method: "DELETE"
url: "/server/to-do/remove/:ID"
  • Delete all to-do itens
method: "DELETE"
url: "/server/to-do/remove-all"
  • Get all to-do itens
method: GET
url: "/server/to-do/"