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

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -