Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Understanding Express Middleware!
You have completed Understanding Express Middleware!
Preview
Learn what middleware does in Express and what it looks like in code.
Prerequisite Course
For best results, we recommend first taking this prerequisite course...
HTTP Request Methods (GET, POST, etc)
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Express is described as a routing and
middleware web framework.
0:00
When you work with Express you're
almost always working with middleware.
0:00
So what is middleware?
0:04
Consider when someone asks you a question.
0:06
You hear the question, think about it for
a moment and then answer the question.
0:09
That middle step, the thinking,
is analogous to what middleware does.
0:13
An Express application receives
requests and sends responses.
0:18
If we open up an Express app to see
what happens between a request and
0:24
a response,
it sort of works like a conveyor belt.
0:28
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up