I have a node.js app located at /foo/bar/app.js
If I start it the like this:
cd /foo/bar
node app.js
lets say it was given PID 555 is it possible to find the absolute path /foo/bar/app.js
of the app it's running? If I run ps 555
it will only tell me app.js
because that's the argument that was passed to node. Is there any way to find out the full path of that node process?
UPDATE
I guess I should also point out that I'm not trying to get the path of the current app. It's a separate node app that is trying to find this info. Which may or may not be in the same directory. I'm guessing I'll need to use unix commands through node's Child Process module.