express-static Flashcards

1
Q

What does express.static() return?

A

a middleware function
- middleware functions take a req, res, and (use?)

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 directory of the file that you are currently in

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

joins all path segments (must be strings or type error is thrown) into one path and normalizes them (accounting for all of the ‘..’ and ‘.’ or ‘dot dot’ and ‘dots’)

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