Implement a Route Handler
Learn how to implement a route handler for POST.
We'll cover the following...
We’ve already seen an example of a built-in middleware when we used the express.static()
method earlier on to serve static assets to the client.
Route handler for POST
A common server task is to handle form data or JSON data submitted via a POST
request. However, by default, Express doesn’t know how to handle certain types of requests, like a POST
request that contains JSON data in the request body, unless we call specific middlewares.
Let’s take a look at two widely used built-in middlewares:
...