Express-Static Flashcards

1
Q

What is the purpose of the Express Static middleware?

A

it is to serve a directory or file to a url so that it can be publicly accessed

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

What does express.static() return?

A

it returns access to certain directories for public access. if the file path is not found it will call the next() method and move on to the next middleware function

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

Any kind of file can be served as static content as long as it does not change in response to a user’s actions or inputs. This includes 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

using express.static() function

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