This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//include express library | |
const express = require('express'); | |
const app = express(); | |
//include mongodb client library | |
const MongoDb = require('mongodb').MongoClient; | |
//declare the parameters to connect to MongoDB server and DB | |
const mongoDbUrl = 'mongodb://localhost:27017'; | |
const mongoDbDatabaseName = 'rest-api'; |