123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 'use strict';
- /**
- *
- *
- * @author Mai
- * @date
- * @version
- */
- module.exports = appInfo => {
- const config = {};
- // 数据库配置
- config.mysql = {
- client: {
- // host
- host: '127.0.0.1',
- // 端口号
- port: '3306',
- // 用户名
- user: 'root',
- // 密码
- password: 'root',
- // 数据库名
- database: 'calculation',
- },
- // 是否加载到 app 上,默认开启
- app: true,
- // 是否加载到 agent 上,默认关闭
- agent: false,
- };
- // redis设置
- config.redis = {
- client: {
- host: '127.0.0.1',
- port: '6379',
- password: 'test',
- db: '0',
- },
- agent: true,
- };
- // 中间件
- config.middleware = ['urlParse', 'sortFilter', 'autoLogger'];
- return config;
- };
|