var path       = require('path');
var settings = {
  env:"dev",
  basepath   : path.normalize(path.join(__dirname, '../..')),
  port       : process.env.NODE_PORT || 3001,
  redis:function(){
    if(this.env=="dev"){
      var localsettings=require("./localsettings");
      return localsettings.redis;
    }else {
      return {
        host:"xxxxx",
        port:xxxxx,
        password:"xxxxx",
        db:xx,
      };
    }
  },
  database:function(){
    if(this.env=="dev"){
      var localsettings=require("./localsettings");
      return  localsettings.database();
    }else{
      return {
       dbname : "xxxxx",
       user     : "xxxx",
       password : "xxxxx",
       config   : {
           host: 'xxxxxx',
           dialect: 'mysql',
           operatorsAliases: false,
           pool: {
             max: 5,
             min: 0,
             acquire: 90000000,
             idle: 1000000
           },
           debug:false,
           dialectOptions:{
               requestTimeout: 999999,
               // instanceName:'DEV'
           }  //设置MSSQL超时时间
       },
     };
    }
  }
};
module.exports = settings;
