express-static Flashcards
1
Q
What does express.static() return?
A
Middleware function, serve static
2
Q
What is the local __dirname variable in a Node.js module?
A
The directory name of the current module. This is the same as the path.dirname() of the __filename.
It starts with / so it is absolute file path since it starts at the root of the file system
3
Q
What does the join() method of Node’s path module do?
A
The path.join() method joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.