Skip to content

Instantly share code, notes, and snippets.

@maximgatilin
Created March 25, 2018 15:02
Show Gist options
  • Save maximgatilin/3a809e8e532a283d072400267682e550 to your computer and use it in GitHub Desktop.
Save maximgatilin/3a809e8e532a283d072400267682e550 to your computer and use it in GitHub Desktop.
Get file name in node js
const path = require('path'),
scriptName = path.basename(__filename);
console.log(scriptName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment