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

Better configuration (failure) handling #2

Open
ulfsauer0815 opened this issue Jan 23, 2017 · 0 comments
Open

Better configuration (failure) handling #2

ulfsauer0815 opened this issue Jan 23, 2017 · 0 comments

Comments

@ulfsauer0815
Copy link
Owner

Problems:

  1. Configuration via environment variables
    The implementation is simple and relatively easy to deal with for deployment, docker etc., but maybe not as convenient and popular as file-based configuration.

  2. Configuration loading is done in a simple Maybe monad, so there is no reporting on failures.
    Any kind of error in the configuration just yields an "invalid configuration" message and won't start.

Possible solutions:

  • use a configuration library: probably file-based format (ini, json, yaml?), easy to deal with, built-in error handling
  • use an something like ExceptT instead of `MaybeT'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant