express-static Flashcards
1
Q
What does express.static() return?
A
a middleware function
- middleware functions take a req, res, and (use?)
2
Q
What is the local __dirname variable in a Node.js module?
A
the directory of the file that you are currently in
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’)