Last active
September 7, 2017 19:00
-
-
Save nomanHasan/dda5a5af80bce7d9e183cb8a7ed9827f to your computer and use it in GitHub Desktop.
Add Mongoose Connection
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
var mongoose = require('mongoose') | |
mongoose.connect('mongodb://127.0.0.1:27017/todoapp', { useMongoClient: true}) | |
.then(()=> { console.log(`Succesfully Connected to the Mongodb Database at URL : mongodb://127.0.0.1:27017/todoapp`)}) | |
.catch(()=> { console.log(`Error Connecting to the Mongodb Database at URL : mongodb://127.0.0.1:27017/todoapp`)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment