nodejsHow to get current file name
Usage example
let file = __filename
console.log(file)
output
/tmp/test.js
Related
More of Nodejs
- How to get current timestamp in seconds
- How to set content type in HTTP server
- How to send message to client from websocket server
- How to write file
- How to read stream to Buffer
- How to read file
- How to get path dirname
- How to run Node.js script in background
- How to read stream to string
- How to make GET request
See more codes...