This repository contains all code to handle simple connection to MongoDB in an Express application.
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.