OlofBlomqvist / odd-box

dead simple reverse proxy and webserver
https://odd-box.cruma.io/
MIT License
9 stars 1 forks source link

API #5

Closed OlofBlomqvist closed 3 months ago

OlofBlomqvist commented 3 months ago

This PR adds a basic admin API. A large part of the changes are done to enable changes of the configuration at runtime by sharing access to a single arced config instance so that one can crud sites thru the API.

New configuration setting added:

admin_api_port = 6789 # optional - leave out to disable the admin api

Current impl will inline the contents of index.html and script.js such that it gets baked in to the binary rather than shipped as external files.