Files
workflow/config/config.prod.example.js
T
2022-07-05 14:40:21 +08:00

41 lines
842 B
JavaScript

'use strict';
const path = require('path');
module.exports = appInfo => {
return {
static: {
maxAge: 0,
buffer: false,
preload: false,
maxFiles: 0,
},
logger: {
outputJSON: true,
level: 'INFO',
// level: 'DEBUG',
// allowDebugAtProd: true,
dir: path.join(appInfo.baseDir, 'logs'),
contextFormatter(meta) {
return `[${meta.date}] [${meta.level}] [${meta.ctx.method} ${meta.ctx.url}] ${meta.message}`;
}
},
knex: {
client: {
dialect: 'mysql',
connection: {
host: '127.0.0.1',
port: '3306',
user: 'root',
password: '123456',
database: 'xianfeng-v1'
},
pool: { min: 0, max: 30 },
acquireConnectionTimeout: 30000
},
app: true
}
};
};