node.js で 「実行中のファイル」「ワーキングディレクトリ」を取得する

● node.js で 「実行中のファイル」を取得する

const currentFilename = __filename

● node.js で 「実行中のファイルがあるディレクトリ」を取得する

const currentDirname = __dirname

● node.js で 「ワーキングディレクトリ」を取得する

const workDirectory = process.cwd()
No.2440
01/13 10:25

edit