Node.js · Middle · Question 36 of 75

How do you serve a folder of static files in Express?

Explanation

express.static sets content types and caching headers and handles ranges. In production, static files are often served by a CDN or a reverse proxy instead.

Further reading

Problem with a question

Node.js · Middle · question 36

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz