I encoded a node.js application which, when executed, should return CWD from the process in order to read files on disk.
When I run the application directly from node in the actual applications directory ...
node app.js
everything works fine, and "process.cwd ()" returns a good path. But when the script is launched with upstart or even directly with a node from another directory "process.cwd ()" return "/" in the case of an upstart and any directory from a witch, I directly launch my application using node. So process.cwd () seems to list the directory from the command line. What for? What to do?
source
share