-
-
Notifications
You must be signed in to change notification settings - Fork 550
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
Allow initialization without config file #249
Comments
HalosGhost
referenced
this issue
in HalosGhost/halosgho.st
Oct 17, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment, there are two init functions:
lwan_init()
lwan_init_with_config()
As a side-note, the naming convention of these functions is somewhat confusing. The first function implicitly reads from a lwan configuration file (with the same name as the binary being run). The second allows you to pass a configuration struct, and therefore should allow for not needing a configuration file to be present.
Unfortunately, using
lwan_init_with_config()
does not escape the need for a configuration file. Lwan still requires a minimal config file when using this function, roughly:Ideally, using
lwan_init_with_config()
should escape any need for a configuration file. Perhaps a configuration file, if one is present, should still be honored (though I am unsure if that's actually preferable), but it certainly should not be required.It looks like the specific culprit here is
try_setup_with_config()
(reproduced below for ease):I am hoping this can be modified such that if
config != &default_config
, it skips the check for the config file path. Does that sound reasonable? Are there any assumptions I am making which mean this needs to be done in a different way or that this cannot be done at all?The text was updated successfully, but these errors were encountered: