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
Post a Comment