Why is require.main.filename different on Azure that it is on my local windows machine?

Viewed 2830

On my local machine, this code:

var path = require('path');
var appdir = path.dirname(require.main.filename);
console.log(appdir);

will log "c:\sites\mysite"

On Azure, I see this instead: D:\Program Files (x86)\iisnode

I know, from setting the node version to be my own that the path to my app is D:\home\site\wwwroot

And, according to the docs "the entry point of the current application can be obtained by checking require.main.filename."

Any ideas on what could be going wrong?

1 Answers
Related