Improve app configuration
Configuration is now kept in well-defined structs, which
are easier to track and more type safe. Adding new config
options should be easier, and there is less reliance on
almighty global values and opaque *viper.Viper configs.
This is preliminary work for untangling this app, and getting tests!
- Fixed passing config location via the command line
- Reworked `cmd` package, reusing code
- Removed global variables where able
- Improved error log messages
- Toggled on compression of log files, on rotation
Allow plain HTTP if certs are not configured
For speeding up development & initial site stand up.
This all began because I was testing things and and discovered that the --config flag for overriding the config file location was busted. One thing led to another, and now there's this few hundred line PR. All part of the cycle of coming back every few months and trying to remember how everything works!
This all began because I was testing things and and discovered that the
--config
flag for overriding the config file location was busted. One thing led to another, and now there's this few hundred line PR. All part of the cycle of coming back every few months and trying to remember how everything works!