opti: use mongoose useMongoClient option

This commit is contained in:
suxiaoxin 2017-09-26 13:51:46 +08:00
parent 3282991709
commit 5672dce897
2 changed files with 1 additions and 3 deletions

View File

@ -1,7 +1,5 @@
{
"port": "3000",
"webhost": "yapi.local.qunar.com",
"server_ip": "192.168.1.1",
"adminAccount": "admin@admin.com",
"db": {
"servername": "127.0.0.1",

View File

@ -16,7 +16,7 @@ function connect(callback) {
mongoose.Promise = global.Promise;
let config = yapi.WEBCONFIG;
let options = {};
let options = {useMongoClient: true};
if (config.db.user) {
options.user = config.db.user;