Skip to content

NickNaso/express-mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to connect to MongoDB in express.js application

This repository contains all code to handle simple connection to MongoDB in an Express application.

Installation

To install and test the code please follow the following steps:

  • Install MongoDB Server on your system and start it at default port 27017. Plase see: MongoDB
  • Clone or fork the repository
  • Go to the local repository folder and digit
npm install
  • Once all requested modules have been installed digit
npm start

The express application start at: http://localhost:5000/

The only route active on express is: http://localhost:5000/test

After you call the route you get an empty list in response as json format.

I created this repository for all of you have trouble in handle MongoDB connection using Express. Feel free to send me feedback and issue to improve the example.

Nicola Del Gobbo

https://github.com/NickNaso/

https://www.npmjs.com/~nicknaso

https://twitter.com/NickNaso

About

How to connect to MongoDB in express.js application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages