nomanHasan
9/7/2017 - 6:59 PM

Add Mongoose Connection

Add Mongoose Connection


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`)})