Commit 9c1cd915 by 蒋勇

setttings

parent 755b3032
...@@ -71,45 +71,45 @@ var settings = { ...@@ -71,45 +71,45 @@ var settings = {
return "https://bpohhr.gongsibao.com/"; return "https://bpohhr.gongsibao.com/";
} }
}, },
redis: function () { redis:function(){
if (this.env == "dev") { if(this.env=="dev"){
var localsettings = require("./localsettings"); var localsettings=require("./localsettings");
return localsettings.redis; return localsettings.redis;
} else { }else {
return { return {
host: "xxxxx", host:ENVINPUT.REDIS_HOST,
port: xxxxx, port:ENVINPUT.REDIS_PORT,
password: "xxxxx", password:ENVINPUT.REDIS_PWD,
db: xx, db:ENVINPUT.REDIS_DB,
}; };
} }
}, },
database: function () { database:function(){
if (this.env == "dev") { if(this.env=="dev"){
var localsettings = require("./localsettings"); var localsettings=require("./localsettings");
return localsettings.database; return localsettings.database;
} else { }else{
return { return {
dbname: "xxxxx", dbname : ENVINPUT.DB_NAME,
user: "xxxx", user : ENVINPUT.DB_USER,
password: "xxxxx", password : ENVINPUT.DB_PWD,
config: { config : {
host: 'xxxxxx', host: ENVINPUT.DB_HOST,
dialect: 'mysql', dialect: 'mysql',
operatorsAliases: false, operatorsAliases: false,
pool: { pool: {
max: 5, max: 5,
min: 0, min: 0,
acquire: 90000000, acquire: 90000000,
idle: 1000000 idle: 1000000
}, },
debug: false, debug:false,
dialectOptions: { dialectOptions:{
requestTimeout: 999999, requestTimeout: 999999,
// instanceName:'DEV' // instanceName:'DEV'
} //设置MSSQL超时时间 } //设置MSSQL超时时间
}, },
}; };
} }
}, },
settleDB: function() { settleDB: function() {
...@@ -138,4 +138,5 @@ var settings = { ...@@ -138,4 +138,5 @@ var settings = {
}; };
} }
}; };
module.exports = settings; settings.ENVINPUT=ENVINPUT;
\ No newline at end of file module.exports = settings;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment