Files
workflow/config/config.env.example.js
T
2024-04-09 13:56:40 +08:00

42 lines
971 B
JavaScript

'use strict';
const path = require('path');
require('dotenv').config({path: path.resolve(__dirname, '../../.env')});
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: process.env.DB_HOST,
port: process.env.DB_PORT,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: 'jianghujs_workflow'
},
pool: { min: 0, max: 10 },
acquireConnectionTimeout: 30000
},
app: true
}
};
};