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 environment variable
- How to POST JSON data
- How to read stream to Buffer
- How to set content type in HTTP server
- How to pipeline streams
- How to get UTC timestamp
- How to run Node.js script
- How to send JSON response from HTTP server
- How to read stream to string
- How to include js file
See more codes...