express-static Flashcards

1
Q

What does express.static() return?

A

A middleware function called serveStatic.

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

What is the local __dirname variable in a Node.js module?

A

The absolute path to the directory.

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

What does the join() method of Node’s path module do?

A

It joins the absolute directory path with another directory to make static files from that directory accessible. It can go up or down absolute paths via /../ or /dirname.

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