Basic Node and Express - Serve an HTML File; __dirname?

Basic Node and Express - Serve an HTML File; __dirname?
0

#1

I passed the challenge but don’t understand how __dirname works.

Does __dirname provide all the path from the root until the current directory where I am in?

https://learn.freecodecamp.org/apis-and-microservices/basic-node-and-express/serve-an-html-file


#2

You can use the console.log(path); to see how the __dirname worked.
note: path means the “__dirname + relativePath/file.ext”