config.qa.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. 'use strict';
  2. /**
  3. * 开发环境相关配置
  4. *
  5. * @author CaiAoLin
  6. * @date 2017/8/29
  7. * @version
  8. */
  9. module.exports = appInfo => {
  10. const config = {};
  11. // 数据库配置
  12. config.mysql = {
  13. client: {
  14. // host
  15. host: '192.168.1.70',
  16. // 端口号
  17. port: '3306',
  18. // 用户名
  19. user: 'root',
  20. // 密码
  21. password: 'root',
  22. // 数据库名
  23. database: 'calculation',
  24. },
  25. // 是否加载到 app 上,默认开启
  26. app: true,
  27. // 是否加载到 agent 上,默认关闭
  28. agent: false,
  29. };
  30. // 表名前缀
  31. config.tablePrefix = 'zh_';
  32. // redis设置
  33. config.redis = {
  34. client: {
  35. host: '192.168.1.70',
  36. port: '6379',
  37. password: 'test',
  38. db: '0',
  39. },
  40. agent: true,
  41. version: '1.0.0',
  42. };
  43. //config.filePath = appInfo.baseDir + '/app/public/files';
  44. config.filePath = '//Mai/share_calc';
  45. // session配置
  46. config.session = {
  47. key: 'ZHC_SESS',
  48. maxAge: 7 * 24 * 3600 * 1000, // 7天
  49. httpOnly: true,
  50. encrypt: true,
  51. //renew: true, // session临近过期更新过期时间
  52. rolling: true, // 每次都更新session有效期
  53. };
  54. // 是否压缩替换前端js
  55. config.min = false;
  56. config.logger = {
  57. consoleLevel: 'WARN',
  58. disableConsoleAfterReady: false,
  59. };
  60. return config;
  61. };