1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 'use strict';
- /**
- * 开发环境相关配置
- *
- * @author CaiAoLin
- * @date 2017/8/29
- * @version
- */
- module.exports = appInfo => {
- const config = {};
- // 数据库配置
- config.mysql = {
- client: {
- // host
- host: '192.168.1.70',
- // 端口号
- port: '3306',
- // 用户名
- user: 'root',
- // 密码
- password: 'root',
- // 数据库名
- database: 'calculation',
- },
- // 是否加载到 app 上,默认开启
- app: true,
- // 是否加载到 agent 上,默认关闭
- agent: false,
- };
- // 表名前缀
- config.tablePrefix = 'zh_';
- // redis设置
- config.redis = {
- client: {
- host: '192.168.1.70',
- port: '6379',
- password: 'test',
- db: '0',
- },
- agent: true,
- version: '1.0.0',
- };
- //config.filePath = appInfo.baseDir + '/app/public/files';
- config.filePath = '//Mai/share_calc';
- // session配置
- config.session = {
- key: 'ZHC_SESS',
- maxAge: 7 * 24 * 3600 * 1000, // 7天
- httpOnly: true,
- encrypt: true,
- //renew: true, // session临近过期更新过期时间
- rolling: true, // 每次都更新session有效期
- };
- // 是否压缩替换前端js
- config.min = false;
- config.logger = {
- consoleLevel: 'WARN',
- disableConsoleAfterReady: false,
- };
- return config;
- };
|