fix:bug
This commit is contained in:
@@ -22,7 +22,8 @@ const accessLogPath = path.join(logDir, 'node-access.log');
|
||||
const accessLogStream = fs.createWriteStream(accessLogPath, { flags: 'a' });
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
// 提高 JSON 体积上限,便于传输图片 base64(默认 100kb 太小)
|
||||
app.use(express.json({ limit: '20mb' }));
|
||||
app.use(morgan('dev'));
|
||||
app.use(morgan('combined', { stream: accessLogStream }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user