express-static Flashcards

1
Q

What does express.static() return?

A

It returns a middleware function that serves static files from a directory specified as the first argument.

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

__dirname is a global variable in Node.js that represents the directory name of the current module. It gives you the absolute path of the directory containing the current module file.

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

used to join multiple path segments into a single path. It takes one or more string arguments, which represent the parts of the path, and concatenates them, adding the appropriate directory separator (/

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