Node.JS know where program is launched from -


i'm asking myself if possible see user launching program ?
example : script in /home/user1/test.js, , user inside /home/user1/a-dir/, when enters
$ node ../test.js
possible user launched program ? (in case, /home/user1/a-dir/ )

thanks.

you can current directory of process process.cwd().


Comments

Popular posts from this blog

javascript - Create websocket without connecting -

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

Android SDK Manager freezes after installation of OSX 10.11 El Capitan public Beta -