Express Static Flashcards

1
Q

What is the purpose of the Express Static middleware?

A

sends files within the root provided to build a server with multiple locations
To serve static files such as images, CSS files, and JavaScript files,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does express.static() return?

A

use() function executes middleware in order. The express. static() middleware returns an HTTP 404 if it can’t find a file,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are several examples of static files?

A

images, JavaScript files, CSS files, videos, Flash files, even web pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a good way to serve application images using Express?

A

To serve static files such as images, CSS files, and JavaScript files, use the express.static built-in middleware function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly