chanjs 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/chan.js +1 -1
- package/core/lib/config/config.js +1 -0
- package/core/lib/core.js +2 -2
- package/package.json +1 -1
package/core/chan.js
CHANGED
@@ -41,7 +41,7 @@ class Chan {
|
|
41
41
|
const configPath = path.join(config.APP_PATH, "config/index.js");
|
42
42
|
if (fs.existsSync(configPath)) {
|
43
43
|
const config = require(configPath);
|
44
|
-
Chan.config =
|
44
|
+
Chan.config = {...Chan.config,...config};
|
45
45
|
}
|
46
46
|
}
|
47
47
|
|
package/core/lib/core.js
CHANGED
@@ -7,7 +7,7 @@ const path = require("path");
|
|
7
7
|
const view = require("./middleware/view.js");
|
8
8
|
module.exports = async function (app) {
|
9
9
|
|
10
|
-
const { logger,APP_PATH, cookieKey, maxAge } = app.config;
|
10
|
+
const { logger,APP_PATH, cookieKey, maxAge,JSON_LIMIT } = app.config;
|
11
11
|
//日志
|
12
12
|
app.use(morgan(logger.level));
|
13
13
|
|
@@ -18,7 +18,7 @@ module.exports = async function (app) {
|
|
18
18
|
app.use(cookieParser(cookieKey));
|
19
19
|
|
20
20
|
//解析接口 json & url
|
21
|
-
app.use(express.json());
|
21
|
+
app.use(express.json({ limit: JSON_LIMIT}));
|
22
22
|
app.use(express.urlencoded({ extended: false }));
|
23
23
|
|
24
24
|
//配置模板引擎
|