-
-
Save the-vampiire/3fe78764f70080bc2736f6820862ba34 to your computer and use it in GitHub Desktop.
set node process.env variables without dependencies
This file contains hidden or 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
| PORT=8008 | |
| OTHER_VAR='stuff' |
This file contains hidden or 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
| { | |
| "start": "env $(cat .env) node file-name.js", | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this approach does not require
dot-envor any other 3rd party node dependency.here is an example for use with
nodemon:.envPORT=8008 OTHER='stuff'package.json{ ... "dev": "env $(cat .env) nodemon app.js", ... }usage
in the app