Let's build a simple server that pipes the client's request through multiple functions.
We will talk about:
-
Building routes
-
Working with parameters and query parameters
-
Application-level and route-level middleware
-
Third-party middleware vs custom middleware
-
Error-handling middleware
-
Fork and clone this repository
-
Set-up this project as an npm project
-
Install
express
,body-parser
,morgan
, andnodemon
-
Set-up a simple server in a new file called
app.js
-
Write a "dev" script that runs
app.js
withnodemon