NodeJS Tutorials

  • How to get the current file path in Node

    Accessing the current file path in Node can be handled in multiple ways. The easiest way to get the current file path in NodeJS is to use the module variable __dirname. An example of how to use this is below: There is also another variable that works very similar called __filename, but __filename will return … Read more