nodejsHow to get current script path
Usage example
let dir = __dirname
console.log(dir)
output
/tmp
Related
More of Nodejs
- How to write file
- How to get current timestamp in seconds
- How to read stream to string
- How to post url-encoded data
- How to read stream to Buffer
- How to get UTC timestamp
- How to calculate memory script uses
- How to POST JSON data
- How to install latest Node.js version on Ubuntu
- How to make POST request
See more codes...