mleku @mleku - 1d
#realy #devstr #progressreport i slept on it and figured out the best way to do this was to have the relay check for configuration and if it's missing, it generates a first time password that you can use with the web UI at /api and you must add an npub to the admins list, after which the admin functions require auth from this i also put the nurl CLI tool and the nauth tool that can generate expiring authorization tokens, which can then be used to do any function that is authorised on the HTTP UI gotta finish up make sure all the HTTP endpoints actually are working and then i'm moving to putting the websocket in yesterday i finally got the router i wrote working, so the main application is very lightweight... ah yes i need to make some build tags and separate files to be able to disable the apis once they are working, getting them initialised is a one liner in the main, but could be in a separate function in a separate file that can be masked out to disable it
bah, i don't think there is any sense in disabling the http api, only the socket api, which is much more retarded... doing the configuration through the socket api is gonna mean writing yet another fucking shit lol no... the http api is mandatory, i'm using it at minimum also for managing the configuration, because this means there is a simple interface i can use already to do this, and not have to have five billion shits in the configuration system that can't be dynamically changed part of the whole point of making the http api is to make it easier to manage... later i could put an actual more advanced web interface front end on it, or write a custom CLI to do all these things, and the interface is really simple and i have all the pieces to enable it