CWD of an Node.js application started with upstart (Ubuntu) -


i've coded node.js app when executed need return cwd process able read files on disk.

when start app directly node in actual app directory...

 #!sh  node app.js 

everything working fine , "process.cwd()" return path. when script started upstart or directly node other directory "process.cwd()" return "/" in case of upstart , whatever directory witch directly start app node. process.cwd() seem output directory witch command executed. why? do?

node.js provides global variable "__dirname" provide actual path of application.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -