mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
chore: modify dev config
This commit is contained in:
parent
a525c435d4
commit
cad35e4527
@ -3,9 +3,11 @@
|
|||||||
"webhost": "127.0.0.1",
|
"webhost": "127.0.0.1",
|
||||||
"adminAccount": "admin@admin.com",
|
"adminAccount": "admin@admin.com",
|
||||||
"db": {
|
"db": {
|
||||||
"servername": "127.0.0.1",
|
"servername": "10.86.40.194",
|
||||||
"DATABASE": "yapi",
|
"DATABASE": "yapi",
|
||||||
"port": 27017
|
"port": 27017,
|
||||||
|
"user": "admin",
|
||||||
|
"pass": "qunar.com"
|
||||||
},
|
},
|
||||||
"mail": {
|
"mail": {
|
||||||
"host": "smtp.163.com",
|
"host": "smtp.163.com",
|
||||||
|
@ -16,7 +16,10 @@ function connect(){
|
|||||||
mongoose.Promise = global.Promise;
|
mongoose.Promise = global.Promise;
|
||||||
let config = yapi.WEBCONFIG;
|
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) {
|
db.then(function (res) {
|
||||||
yapi.commons.log('mongodb load success...')
|
yapi.commons.log('mongodb load success...')
|
||||||
|
Loading…
Reference in New Issue
Block a user