Skip to content
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

Consider using a dynamic config.json to handle settings #35

Closed
KNOXDEV opened this issue Jun 4, 2019 · 6 comments
Closed

Consider using a dynamic config.json to handle settings #35

KNOXDEV opened this issue Jun 4, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@KNOXDEV
Copy link

KNOXDEV commented Jun 4, 2019

I think requiring CLI arguments to function properly is not an ideal configuration strategy for what essentially amounts to a service. I propose the following:

  1. Eliminate all command line arguments except one: --config that will allow you to declare the location of config.json dynamically
  2. If the config argument above is not passed, fall back to some POSIX-y default, like ~/.andesite/config.json
  3. Move all previous command line settings into config.json

This strategy is very typical for applications of this nature.

@KNOXDEV
Copy link
Author

KNOXDEV commented Jun 4, 2019

I forgot to mention that I did see Issue #26, but I'm not sure what the status is on that endeavor, this issue proposes a different solution entirely, and I believe this offers a better alternative.

@nektro
Copy link
Owner

nektro commented Jun 4, 2019

I recently added --use-home true which places the config.json inside of ~/.config/andesite/. Is this a suggestion to also be able to set --root, --port, and others from inside the config file? Just clarifying before I move forward.

@nektro
Copy link
Owner

nektro commented Jun 4, 2019

Actually, --use-home is going to be removed and it will auto fallback to ~/.config/andesite/ if /.andesite/ is not found in --root.

@nektro
Copy link
Owner

nektro commented Jun 4, 2019

Also, #26 was originally created to be used in conjunction with eventual Docker support and not manual usage. Though people would be free to do so.

@KNOXDEV
Copy link
Author

KNOXDEV commented Jun 4, 2019 via email

@nektro nektro added the enhancement New feature or request label Jun 4, 2019
@nektro nektro closed this as completed in 0685244 Jun 5, 2019
@nektro
Copy link
Owner

nektro commented Jun 5, 2019

The Andesite executable can now be launched with no CLI arguments and is able to read all config info from the respective properties inside ~/.config/andesite/config.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants