andesite
andesite copied to clipboard
[Feature] Generate template `config.json` on first run if not found.
As above or add setup process on first time web page load/when no config found. This would ease setting up Andesite for non-technical people.
This line https://github.com/nektro/andesite/blob/master/main.go#L67 does. However, the contents of the generated file are only {}
and does not provide any usable values outside the built in defaults. I do the like the idea of having it make a template instead, though it might be hard to explain intrinsically since JSON does not allow comments of any kind. Approved, and hopefully better names going forward for the config.json
properties can help with this.
Other option would be to create a config.template.json
that holds template data which can be easily used with cp config.template.json config.json
.
IMO, best route would be to script a logical test during accessing Andesite with webrowser whether config.json
exists or not, if not it would provide a web setup. I'll see if it would be easy enough for me make it and drop a pull request later.