andesite icon indicating copy to clipboard operation
andesite copied to clipboard

[Feature] Generate template `config.json` on first run if not found.

Open catthehacker opened this issue 5 years ago • 2 comments

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.

catthehacker avatar Jul 24 '19 14:07 catthehacker

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.

nektro avatar Jul 25 '19 01:07 nektro

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.

catthehacker avatar Jul 25 '19 01:07 catthehacker