MaiXinRong 5 年之前
父节点
当前提交
428e7692fd
共有 2 个文件被更改,包括 61 次插入3 次删除
  1. 4 3
      config/config.default.js
  2. 57 0
      config/config.uat.js

+ 4 - 3
config/config.default.js

@@ -12,9 +12,9 @@ module.exports = appInfo => {
             // 端口号
             port: '3306',
             // 用户名
-            user: 'smartcost',
+            user: 'zh_calc',
             // 密码
-            password: 'zongheng_@)!(_jlzf',
+            password: 'zh@)!(3850calc',
             // 数据库名
             database: 'calculation',
         },
@@ -31,10 +31,11 @@ module.exports = appInfo => {
         client: {
             host: '127.0.0.1',
             port: '6379',
-            password: 'zongheng_@)!(_jlzf',
+            password: 'zh@)!(3850sc',
             db: '0',
         },
         agent: true,
+        version: '1.0.0',
     };
 
     // should change to your own

+ 57 - 0
config/config.uat.js

@@ -0,0 +1,57 @@
+'use strict';
+/**
+ * 开发环境相关配置
+ *
+ * @author CaiAoLin
+ * @date 2017/8/29
+ * @version
+ */
+
+module.exports = appInfo => {
+    const config = {};
+    // 数据库配置
+    config.mysql = {
+        client: {
+            // host
+            host: '127.0.0.1',
+            // 端口号
+            port: '3306',
+            // 用户名
+            user: 'smartcost',
+            // 密码
+            password: 'zongheng_@)!(_jlzf',
+            // 数据库名
+            database: 'calculation',
+        },
+        // 是否加载到 app 上,默认开启
+        app: true,
+        // 是否加载到 agent 上,默认关闭
+        agent: false,
+    };
+    // 表名前缀
+    config.tablePrefix = 'zh_';
+
+    // redis设置
+    config.redis = {
+        client: {
+            host: '127.0.0.1',
+            port: '6379',
+            password: 'zongheng_@)!(_jlzf',
+            db: '0',
+        },
+        agent: true,
+        version: '1.0.0',
+    };
+
+    // session配置
+    config.session = {
+        key: 'ZHC_SESS',
+        maxAge: 7 * 24 * 3600 * 1000, // 7天
+        httpOnly: true,
+        encrypt: true,
+        //renew: true, // session临近过期更新过期时间
+        rolling: true, // 每次都更新session有效期
+    };
+
+    return config;
+};