var mongoose = require('mongoose');
mongoose.connect('mongodb://username:password@host:port/dbname', function (err) {
if (err) {
console.error('connect to %s error: ', config.db, err.message);
process.exit(1);
}
});