1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 'use strict';
- const path = require('path');
- module.exports = appInfo => {
- const config = {};
- // 数据库配置
- config.mysql = {
- client: {
- // host
- host: '47.106.95.114',
- // 端口号
- port: '3306',
- // 用户名
- user: 'smartcost',
- // 密码
- password: 'zongheng_@)!(_jlzf',
- // 数据库名
- database: 'calculation',
- },
- // 是否加载到 app 上,默认开启
- app: true,
- // 是否加载到 agent 上,默认关闭
- agent: false,
- };
- // redis设置
- config.redis = {
- client: {
- host: '47.106.95.114',
- port: '6379',
- password: 'zongheng_@)!(_jlzf',
- db: '0',
- },
- agent: true,
- };
- // session配置
- config.session = {
- key: 'ZH_SESS',
- maxAge: 4 * 3600 * 1000, // 4小时
- httpOnly: true,
- encrypt: true,
- };
- return config;
- };
|