Skip to content

Integrated mongo CRUD functionalities with RESTful API's using NodeJs and ExpressJS

Notifications You must be signed in to change notification settings

clock-322/CRUD-Application-with-Express-and-MongoDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD-Application-with-Express-and-MongoDB

This project is about integrating mongo CRUD functionalities with RESTful API's using NodeJs and ExpressJS. Four type of REST API's methods are mentioned that are GET, POST, PUT, DELETE and each method is integrated with mongo according to it's properties.

  • GET method to fetch data from database collection.
  • POST method to add data to database collection.
  • PUT Method to update data of database collection.
  • DELETE Method to delete data from database collection.

Getting Started

These instructions will get you a basic requirements to run this project.

Prerequisites

Before you start coding you have to install some Node Package Modules.

  1. ExpreJS
  • Fast, unopinionated, minimalist web framework for node
  1. CORS
  • CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options.
  1. Dotenv
  • dotenv is used to store the static value in .env .
  1. body-parser
  • To handle HTTP POST request in Express.js, you need to install middleware module which is body-parser.
  • Body-parser extract the entire body portion of an incoming request stream and exposes it on req.body.
  • This body-parser module parses the JSON, buffer, string and URL encoded data submitted using HTTP POST request.
  1. Joi
  • This module is very usefule for validation of data.
  1. Nodemon
  • nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.

nodemon app.js

The page will reload if you make edits. You will also see any lint errors in the console.

Built with

About

Integrated mongo CRUD functionalities with RESTful API's using NodeJs and ExpressJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published