Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = require('./config.js');
- var mongoose = require('mongoose');
- var db = mongoose.connection;
- db.on('error', console.error.bind(console, 'connection error: '));
- db.once('open', function() {
- console.log('connection with database: ' + config.mongo.url + ' was successfully.');
- });
- mongoose.connect(config.mongo.url);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement