Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mongoose.connect(mongodb://localhost/test, { useMongoClient: true });
- mongoose.Promise = global.Promise;
- const db = mongoose.connection;
- db.on('error', console.error);
- db.once('open', () => {
- console.log(rangi.green('Connected To MongoDB'));
- });
Add Comment
Please, Sign In to add comment