Skip to content

Move init.lua code into 3 smaller files. Consolidate server configuration.#94

Merged
marcoskirsch merged 3 commits intomasterfrom
httpserver-init.lua
Jul 2, 2017
Merged

Move init.lua code into 3 smaller files. Consolidate server configuration.#94
marcoskirsch merged 3 commits intomasterfrom
httpserver-init.lua

Conversation

@marcoskirsch
Copy link
Owner

  • Use wildcard in Makefile for finding lua files.

  • Create 3 files to run at init.lua time:

  1. httpserver-compile.lua
  2. httpserver-wifi.lua
  3. httpserver-init.lua
  • Consolidate all server configuration in httpserver-config.lua

@marcoskirsch marcoskirsch merged commit 7cdbe0f into master Jul 2, 2017
@marcoskirsch marcoskirsch deleted the httpserver-init.lua branch July 2, 2017 03:04
@HHHartmann
Copy link
Contributor

Excellent work, I was also thinking of refactoring the configuration and the 3 file split is even better.
Only drawback is that we always have to load the complete configuration into memory. But that's worth it I think.
Maybe if the config keeps growing we could switch to JSON and read only parts of it with the new sjson module. Dynamic configuration parts would have to be addressed differently then.

@marcoskirsch
Copy link
Owner Author

Only drawback is that we always have to load the complete configuration into memory.

Agreed, will need to keep an eye on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants