Last active
June 25, 2021 17:23
-
-
Save Jaballadares/470bdc38fbe575dc4ece2df107990abb to your computer and use it in GitHub Desktop.
createRequire.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 { createRequire } from "module"; | |
const require = createRequire(import.meta.url); | |
// usage | |
const creds = require('./config/creds.json'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment