how to get absolute path from relative path in nodejs code example
Example: node get absolute path
// to get a valid absolute path
resolve = require('path').resolve
resolve('../../bb/tmp.txt')
// to get current file directory
__dirname
// to get a valid absolute path
resolve = require('path').resolve
resolve('../../bb/tmp.txt')
// to get current file directory
__dirname