Let's get to a basic problem: how do you get the request parameters? In our earlier example, in the Working with streams to process requests section of the previous chapter, we did it by hand, working with the request stream to get the body, and using parsing functions to extract the parameters. However, Express already provides some middleware you can use before any other function in your stack that needs parameters, either from the body or the URL itself. So in this recipe, let's see how we can access the request parameters, which is a very basic need.
Getting request parameters
How to do it...
Let's see what it takes to access the parameters. First, you have to require the body-parser module and ask for the...