var cfg = {
  path:'',
    xsp: {
        accesslog: {
            filePeriod:'1d' //日志可以配置为1d表示1天，2d表示两天一个，1h表示一小时一个，2h表示两小时一个了,整个注释掉就不出日志。
        },
        port: 8972,
        helpers:[
            'helper/helper.js'
        ],
        defaultEncoding: 'utf-8'
    },
    weixin:{

	// appid : 'wxe3dfd7b76df5628a',
         //secret : '577983056b72355391869ba7a0e83c2d',
        // sessionTime:60,
        // state:'pcauto_finance_wx_token' 

        // appid : 'wx72fc6c9b42c9f949',
        //  secret : 'e1e55d984f49a550bba6bb73c315e2e1',
        // sessionTime:60,
        //  state:'sanling'

     appid : 'wx89a61cbb497e10c2',
     secret : '0a960699904011ed325f27c78c5e66c3',
        sessionTime:60,
       state:'holycat_wechattoken'
    },
    r: {
        env: 'dev_direct', //'product';var env = 'dev_direct';
        defaultRequestTimeout: 200000,
        defaultResponseTimeout: 200000,
        failErrorCount: 6,
        failDisableSeconds: 300,
        routeOverwrite: {
        "jr.pcauto.com.cn":"v75.pcauto.com.cn:81",
        "price.pcauto.com.cn":"dev3.pcauto.com.cn:8001"
        },
         memcached:{
           server:['127.0.0.1:11211'],
           options:{
               reconnect: 300000,
               timeout: 500,
               retries: 2,
               failures: 3
           }
        }
    },
    static:{
       path: 'static',//放在static文件夹下面
       maxAge: 72000
    }
};

var rewriteconfig = require('./rewriteconfig').rewriteconfig;

function config() {
    if (rewriteconfig) {
       cfg.rewrite = rewriteconfig;
    }
    return cfg;
}
module.exports.config = config;
