chore: modify dev config

This commit is contained in:
suxiaoxin 2017-07-17 13:47:46 +08:00
parent a525c435d4
commit cad35e4527
2 changed files with 8 additions and 3 deletions

View File

@ -3,9 +3,11 @@
"webhost": "127.0.0.1",
"adminAccount": "admin@admin.com",
"db": {
"servername": "127.0.0.1",
"servername": "10.86.40.194",
"DATABASE": "yapi",
"port": 27017
"port": 27017,
"user": "admin",
"pass": "qunar.com"
},
"mail": {
"host": "smtp.163.com",

View File

@ -16,7 +16,10 @@ function connect(){
mongoose.Promise = global.Promise;
let config = yapi.WEBCONFIG;
let db = mongoose.connect(`mongodb://${config.db.servername}:${config.db.port}/${config.db.DATABASE}`);
let db = mongoose.connect(`mongodb://${config.db.servername}:${config.db.port}/${config.db.DATABASE}`, {
user: config.db.user,
pass: config.db.pass
});
db.then(function (res) {
yapi.commons.log('mongodb load success...')