Skip to content

Instantly share code, notes, and snippets.

View jackie-d's full-sized avatar
🌟
Feel the future

Jackie D jackie-d

🌟
Feel the future
View GitHub Profile
@jackie-d
jackie-d / gist:c940b4523954b247fa23e7317b2f8728
Created March 21, 2018 17:10
Example NPM + Express + MongoDb
//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';