nodejsHow to get current file name
Usage example
let file = __filename
console.log(file)
output
/tmp/test.js
Related
More of Nodejs
- How to create SSL websocket server
- How to set environment variable
- How to send message to client from websocket server
- How to run Node.js script
- How to send JSON response from HTTP server
- How to set content type in HTTP server
- How to read stream to string
- How to read stream to Buffer
- How to POST JSON data
- How to pipeline streams
See more codes...