Aquasar
  • Home
  • Portfolio
  • Articles
  • Pricing
  • About
  • Contact
WEB DEVELOPMENT |SEO |DIGITAL ADS

Validation in Express

Jun 28th, 2019

Alex Quasar

expressvalidation in express

To parse the data that is coming from post requests, you need to use the following express middleware.

i.e in server.js

// Init Middleware
app.use(express.json({ extended: false }));

Depending on the version of express used, you don't need the body-parser module anymore as this comes with express.