获取您的 Node 服务器
var path = require('path');
var filename = path.basename('/Users/Refsnes/demo_path.js');
console.log(filename);

              
demo_path.js