Closed WardCunningham closed 11 years ago
We pass configuration information to server-side plugins. That means plugins depend on how we represent and communicate configuration information. Can we off load this dependency management to npm? Perhaps via a wiki-server-confg module that can be versioned?
Some configuration discussion continues in the context of Redis. https://github.com/WardCunningham/wiki/pull/12.
bc865e9a9e737d1c80bfe374011ebf101539ab38 and subsequent commits simplifiy and document the current configuration choices.
I've not seen further discussion here so I am assuming the improvements to the readme and small enhancements to option handling are working well enough to close this issue.
@nrn writes ...
So right now there is a very complex system of configs, for a few reasons. It allows us to "Do the Right Thing" tm. with no config, a partial config that it then fills in reasonable defaults based on, or an extremely detailed config where you can set all kinds of things that don't make sense.
The complexity in the config system wins by reducing the complexity in the config file. No need for a huge file of defaults and comments a la php, where to change one setting you may have to touch half a dozen lines to make it consistent.
I'll try and get some documentation up on this soon, since it probably only makes sense to me, and it looks like we may be getting some users :)
I like to keep the config separate from the body of the program so we can keep personal configs separate. We can just require .coffee files since we have required coffee-script, however coffee script is weird and is likely to lose us users on the one piece that the most people will have to interact with. As much as it sucks to type I'm going to stick with json for the config file, it is kind of the universal language of this stuff. Right now there is a very weird thing that you have to use the short names instead of the long ones for the config in the file or env vars, I'll be fixing that soon.
You can now specify a json config file with --config. Or if you make a config.json file it will find it and lift that config.