Created
April 27, 2022 18:20
-
-
Save joeyguerra/71300a56c303fd43642f3369e564cc21 to your computer and use it in GitHub Desktop.
Reliably get relative path in Node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { fileURLToPath } from 'url' | |
const dirName = fileURLToPath(import.meta.url).replace('/bin/hubot.mjs', '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment