Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
node.js アプリケーションでは、__dirpath を使用して現在のスクリプトの場所を取得できます。現在実行中の「ノード」の場所を取得するために同じことができますか?
これは、親アプリケーションの実行に使用されたのとまったく同じノード バイナリを確実に使用するノード アプリケーションで新しいプロセスを生成できるようにするためです。
process.execPath
これは、プロセスを開始した実行可能ファイルの絶対パス名です。
http://nodejs.org/api/process.html#process_process_execpath