Nó Obtenha Caminho Absoluto

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

// to get current file directory
__dirname
just-saved-you-a-stackoverflow-visit