Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dotenv improvements
// better file checker
// https://nodejs.org/dist/latest-v7.x/docs/api/fs.html#fs_fs_readfilesync_file_options
fs.accessSync(path.resolve(__dirname,'./config-local.json'), fs.R_OK);
// add .env.js
```js
const envJS = require('./.env.js')
await envJS()
```
```js
export default async function() {
return await fetch('http://someoauth.com/auth')
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment