Skip to content

Boilerplate for creating REST APIs using MongoDB, NodeJS, Mongoose along with Express Framework

Notifications You must be signed in to change notification settings

rajandmr/mongodb-nodejs-mongoose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

This code performs the basic CRUD operation on MongoDB. In order to run, clone the repo, navigate into root directory and run

npm install

This will install all the required dependencies. Now, create a file .env at the root level that is as same level as server.js and initialize 2 variables.

DB = "Your connection String here"

PORT = "Your desired port, default is 8080"

Now run

node server.js

This will start the server and log a message if connection to DB is succesful. You can test the endpoints via Postman.

About

Boilerplate for creating REST APIs using MongoDB, NodeJS, Mongoose along with Express Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published