CodeZettaInterview Hub

Node.js · Express Concepts · Mid-Level · Best Practice

app.use(express.json()) pitfalls?

Short Interview Answer

Default limits may be too high/low; applies to all routes if mounted globally; prototype pollution historically mattered.

Detailed Explanation

Scope parsers. Set explicit limit. Validate with schemas after parse. Don't parse bodies you don't need.

Did you know this answer?