Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express问题汇总 #36

Open
Bobjoy opened this issue Jul 27, 2020 · 1 comment
Open

Express问题汇总 #36

Bobjoy opened this issue Jul 27, 2020 · 1 comment

Comments

@Bobjoy
Copy link
Owner

Bobjoy commented Jul 27, 2020

获取不到POST数据

在app.js中添加如下配置

app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
@Bobjoy Bobjoy changed the title Express获取不到req.body Express问题汇总 Jul 27, 2020
@Bobjoy
Copy link
Owner Author

Bobjoy commented Jul 27, 2020

保存数据报413错误entity too large

在app.js中添加

app.use(bodyParser.json({ limit: '1mb' }));`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant