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 add minutes to date/time
- How to send message to client from websocket server
- How to run Node.js script in background
- How to add hours to date/time
- How to create SSL websocket server
- Example Node.js code
- How to set environment variable
- Websocket client example
- How to get UTC timestamp
See more codes...