Answers for "node get absolute path"

1

node get absolute path

// to get a valid absolute path
resolve = require('path').resolve
resolve('../../bb/tmp.txt')

// to get current file directory
__dirname
Posted by: Guest on March-29-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language