Node.js provides a standard API to do so: Path.
Getting the name of the current script is then easy:
var path = require('path');
var scriptName = path.basename(__filename);
Node.js provides a standard API to do so: Path.
Getting the name of the current script is then easy:
var path = require('path');
var scriptName = path.basename(__filename);