主文件功能拆分

This commit is contained in:
2025-09-26 15:31:29 +08:00
parent a9dcbc2578
commit efb68fce1c
8 changed files with 284 additions and 172 deletions
+16
View File
@@ -0,0 +1,16 @@
/**
* Body Parser中间件
* 处理JSON和URL编码的请求体
*/
const express = require('express');
function bodyParserMiddleware() {
return [
// JSON 解析中间件
express.json({ limit: '20mb' }),
// URL编码解析中间件
express.urlencoded({ extended: true, limit: '20mb' })
];
}
module.exports = { bodyParserMiddleware };