express-static Flashcards

1
Q

What does express.static() return?

A

Static files in the root directory, which is specified with the root argument in express.static() (i.e. express.static(root)).

or

It returns a function, specifically, it console log’s a function.

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

A string that represents the directory name of the current Node.js module

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 all the path segments passed in as arguments. For example, path.join(‘/foo’, ‘bar’, ‘baz/asdf’, ‘quux’, ‘..’); will return the path ‘/foo/bar/baz/asdf’.

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