config.temp.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 'use strict';
  2. const path = require('path');
  3. module.exports = appInfo => {
  4. const config = {};
  5. // 数据库配置
  6. config.mysql = {
  7. client: {
  8. // host
  9. host: '47.106.95.114',
  10. // 端口号
  11. port: '3306',
  12. // 用户名
  13. user: 'smartcost',
  14. // 密码
  15. password: 'zongheng_@)!(_jlzf',
  16. // 数据库名
  17. database: 'calculation',
  18. },
  19. // 是否加载到 app 上,默认开启
  20. app: true,
  21. // 是否加载到 agent 上,默认关闭
  22. agent: false,
  23. };
  24. // redis设置
  25. config.redis = {
  26. client: {
  27. host: '47.106.95.114',
  28. port: '6379',
  29. password: 'zongheng_@)!(_jlzf',
  30. db: '0',
  31. },
  32. agent: true,
  33. };
  34. // session配置
  35. config.session = {
  36. key: 'ZH_SESS',
  37. maxAge: 4 * 3600 * 1000, // 4小时
  38. httpOnly: true,
  39. encrypt: true,
  40. };
  41. return config;
  42. };