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

Add support for command-line flags to configure application #31

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

evanebb
Copy link
Owner

@evanebb evanebb commented Sep 7, 2023

  • Moves retrieving the application configuration outside of the Server struct into its own AppConfig struct for better separation/abstraction and for better 'documentation' as to what configuration is needed instead of it being scattered across a few os.Getenv calls.
  • Changes most of the environment variables to include a GOBBLE_ prefix; this ensures that no conflicts between different applications that might use the same generic environment variable names will occur (when running outside of Docker for example).
  • Adds support for configuration through a set of command-line flags. This is very handy for development on my local machine, where I prefer using these over environment variables.

@evanebb evanebb added the enhancement New feature or request label Sep 7, 2023
@evanebb evanebb self-assigned this Sep 7, 2023
@evanebb evanebb merged commit 65b13b1 into main Sep 7, 2023
1 check passed
@evanebb evanebb deleted the feature/command-flags branch September 7, 2023 12:29
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

Successfully merging this pull request may close these issues.

1 participant