Hosted a node application on Azure as Web App which is using app-root-path library to resolve the file paths. It is resolving to iisnode directory which is the node handler for IIS (D:\Program Files\iisnode) whereas application is hosted in different folder, i.e. D:\home\site\wwwroot.
Steps to reproduce -
- Create a web app on Azure using App Service template.
- Print application path using
console.log(require('app-root-path').path)
Hosted a node application on Azure as Web App which is using app-root-path library to resolve the file paths. It is resolving to iisnode directory which is the node handler for IIS (
D:\Program Files\iisnode) whereas application is hosted in different folder, i.e.D:\home\site\wwwroot.Steps to reproduce -
console.log(require('app-root-path').path)