Giter Site home page Giter Site logo

maniruzzamanakash / node-advanced-crud-api Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 1.0 84 KB

An advanced CRUD API for Node JS & Express implementing with MVC pattern and many more standards...

Home Page: https://node-cruds-api.herokuapp.com/

Shell 1.02% JavaScript 64.31% CSS 1.03% Pug 33.64%
node nodejs-api expressjs expressapi todoapi mongodb-database crudapi nodejsapi mvc-architecture mvc-api

node-advanced-crud-api's Introduction

Advance CRUD API with Node JS & Express

An advanced CRUD API for Node JS implementing with MVC pattern and many more standards...


Technologies & Featuers:

  1. MongoDB
  2. Mongoose
  3. Express JS
  4. Node JS
  5. MVC (Model-View-Controller) Pattern
  6. Schema Validation
  7. Form Validation

How to Run:

Install NPM

npm i

Create .env file by copying .env.example

MONGODB_DEFAULT_DB=
MONGODB_CLUSTER=
MONGODB_USERNAME=
MONGODB_PASSWORD=

Run Project with nodemon setup (Watch any changes)

npm run dev

Postman API Link

https://www.getpostman.com/collections/058c397fd09ae4cf3a9c

Live Web API Demo Links at a glance

  1. Base URL - https://node-cruds-api.herokuapp.com/
  2. All Todos - https://node-cruds-api.herokuapp.com/todos
  3. Single Todos - https://node-cruds-api.herokuapp.com/todos/60fb121b55e09ca6e646e93e
  4. Post API - https://node-cruds-api.herokuapp.com/todos [Body dataset Read below]
  5. Put API - https://node-cruds-api.herokuapp.com/todos/60fb121b55e09ca6e646e93e [Body dataset Read below]
  6. Delete API - https://node-cruds-api.herokuapp.com/todos/60fb121b55e09ca6e646e93e [Body dataset Read below]
  7. Delete All API - https://node-cruds-api.herokuapp.com/todos [Body dataset Read below]

Todo List

URL: http://localhost:3000/todos Method: GET

Response:
[
  {
    "_id": "60fadbf0fb1e9926fb60c07d",
    "title": "First todo",
    "status": "Done"
  },
  {
    "_id": "60fadfc796dbc5f55f4adbe0",
    "title": "Another task",
    "status": "Pending"
  }
]

Todo Detail:

Endpoint: http://localhost:3000/todos/60fadbf0fb1e9926fb60c07d

Method: GET

Response:
{
  "_id": "60fadbf0fb1e9926fb60c07d",
  "title": "First todo",
  "status": "Done"
}

Todo Create:

Endpoint: http://localhost:3000/todos

Method: POST

Body:
{
  "title": "Demo Todo 1",
  "status": "Pending"
}
Response:
{
  "_id": "60fb0e8bd8cd4f9cb52910a0",
  "title": "Demo Todo 1",
  "status": "Pending",
  "createdAt": "2021-07-23T18:46:35.288Z",
  "updatedAt": "2021-07-23T18:46:35.288Z",
  "__v": 0
}

Todo Update:

Endpoint: http://localhost:3000/todos/60fadbf0fb1e9926fb60c07d

Method: PUT

Body:
{
  "title": "Demo Todo 1 Updated",
  "status": "Done"
}
Response:
{
  "message": "Todo has been updated successfully !",
  "data": {
    "_id": "60fadbf0fb1e9926fb60c07d",
    "title": "Demo Todo 1 Updated",
    "createdAt": "2021-07-23T17:54:04.823Z",
    "updatedAt": "2021-07-23T18:54:12.279Z",
    "__v": 0,
    "status": "Done"
  }
}

Todo Delete:

Endpoint: http://localhost:3000/todos/60fadbf0fb1e9926fb60c07d

Method: DELETE

Response:
{
  "message": "Todo has been deleted successfully !",
  "data": {
    "_id": "60fb139e55e09ca6e646e947",
    "title": "Test Todo",
    "status": "Done",
    "createdAt": "2021-07-23T19:08:14.137Z",
    "updatedAt": "2021-07-23T19:08:14.137Z",
    "__v": 0
  }
}

Todo Delete All:

Endpoint: http://localhost:3000/todos

Method: DELETE

Response:
{
  "message": "7 Todos have been deleted successfully !"
}

Contribution:

  1. Create Pull-Request to contribute this Todo API

Contact:

[email protected]

Donate:

Patreon Link - https://www.patreon.com/maniruzzaman

node-advanced-crud-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

wwwk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.