四好公路
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

69 lines
1.6 KiB

/**
* Created by rain on 2015/11/6.
*/
'use strict';
/*jslint node:true*/
const path = require('path');
const os = require('os');
const dev = process.env.DEBUG || true;
const product = {
port: 80,
mws: [{
opts: {
exclude: [{ p: '/healthz', o: 'GET' }]//k8s探针用去掉鉴权
}
}],
dc: {
url: "postgres://postgres:postgres@10.8.30.21:5432/postgres",
opts: {
pool: {
max: 20,
min: 10,
idle: 10000
}
},
models: []
},
logger: {
level: 'debug',
json: false,
filename: path.join(__dirname, 'log', 'runtime.txt'),
colorize: true,
maxsize: 1024 * 1024 * 5,
rotationFormat: false,
zippedArchive: true,
maxFiles: 10,
prettyPrint: true,
label: '',
timestamp: true,
eol: os.EOL,
tailable: true,
depth: null,
showLevel: true,
maxRetries: 1
}
};
const development = {
port: 4000,
mws: [{
opts: {
exclude: [{ p: '/healthz', o: 'GET' }]//k8s探针用去掉鉴权
}
}],
dc: {
url: "sqlite://sqlite:sqlite@localhost:5432/sqlite",
opts: {
storage: path.join(__dirname, 'test', 'test.db'),
define: {
"timestamps": false, "freezeTableName": true
}
},
models: []
},
logger: product.logger
};
development.logger.filename = path.join(__dirname, 'log', 'development.txt');
module.exports = dev ? development : product;