Body parser middleware
In Express, middleware is a function that can transform your request or response objects.
You can create your own middleware, or use some of the many open source middleware available through NPM.
Body parser middleware
Why I bring this up, is that by default, the body of a POST request in Node.js comes in as a stream.
To put the body data in the database, we need to handle the stream and turn it into a simple JavaScript object.
Click to load comments...