nodejsHow to get current file name
Usage example
let file = __filename
console.log(file)
output
/tmp/test.js
Related
More of Nodejs
- How to set content type in HTTP server
- How to write file
- How to read stream to string
- How to read stream to Buffer
- How to get UTC timestamp
- How to POST JSON data
- How to get format date in "yyyy-mm-dd"
- How to get current timestamp in seconds
- How to post url-encoded data
- How to log to file
See more codes...