Node.js __filename get current file name
console.log('__filename='+__filename); console.log('__dirname='+ __dirname); setTimeout(function(){ console.log('world!!'); }, 2000);//ww w . j a v a2 s .co m console.log('hello ');