-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dotenv dependency #1
base: main
Are you sure you want to change the base?
Conversation
The command line options are growing verbose, and it would be nice to maintain the same settings while also not having to specify the entire configuration in either the call to the command or by specifying them in the environment This commit adds a new dependency, dotenv, which allows users to copy the provided sample.env file to ./.env and customize it themselves Also updates .gitignore to support Jetbrains IDEs and commits the package-lock.json to ensure dependency version consistency
Awesome, thanks @sayhiben! I have been feeling similarly about the proliferation of options. It's time to adopt a more scalable pattern. FYI I have been configuring these scripts using systemd unit files, and would suggest others running these scripts in production use an equivalent service configuration / supervisor tool. I've been thinking about switching to
Would you be interested in taking this on? |
I agree - yargs is likely the right solution. I'm actually in the middle of
solving a different challenge with this repo (evaluating live status of
profiles instead of discrete videos). This was a quick and dirty
implementation meant to provide a stepping stone; if you'd rather move to
yargs, I fully support it.
If I'm honest, I don't have bandwidth to handle anything outside of my
critical path right now, although normally I'd take you up on the offer to
implement. I'm happy to keep this in my fork for the time being if that's
preferable to taking on the debt of refactoring it later
…On Sun, Jun 28, 2020 at 3:22 PM Max Goodhart ***@***.***> wrote:
Awesome, thanks @sayhiben <https://github.com/sayhiben>! I have been
feeling similarly about the proliferation of options. It's time to adopt a
more scalable pattern.
FYI I have been configuring these scripts using systemd unit files, and
would suggest others running these scripts in production use an equivalent
service configuration / supervisor tool.
I've been thinking about switching to yargs
<https://www.npmjs.com/package/yargs>, similar to streamwall
<https://github.com/chromakode/streamwall>, so that an optional config
file and parameters is supported (here's how streamwall implements it
<https://github.com/chromakode/streamwall/blob/1087c6855e3e6546d0260d9c260baf71caeebc9c/src/node/index.js#L13-L15>).
I have considered using .env files for this, but it seems like yargs
provides a few advantages:
- separate config files for multiple configurations
- control over config parsing (I've been thinking about switching to
TOML for easy writing)
- param descriptions/--help output
yargs can also consume environment variables
<https://yargs.js.org/docs/#api-envprefix>.
Would you be interested in taking this on?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFFX2SAM2RFMDPGW2XC4BLRY67BRANCNFSM4OKW4TJA>
.
|
The command line options are growing verbose, and it would be nice to
maintain the same settings while also not having to specify the entire
configuration in either the call to the command or by specifying them
in the environment
This commit adds a new dependency, dotenv, which allows users to copy
the provided sample.env file to ./.env and customize it themselves
Also updates .gitignore to support Jetbrains IDEs and commits the
package-lock.json to ensure dependency version consistency