In the OpenFlexure Microscope we need to customise the server (change some logging setup, mount some directories, etc). This means we can't use serve_from_cli, because we can't use serve_from_cli we need to reimplement the logic that brings up the fallback server.
It would be good to have a way to pass in a callable that modifies the sever between creation and being passed to Uvicorn.
Note that we also supply extra logging information to the fallback server, so we would need a hook for that too.
In the OpenFlexure Microscope we need to customise the server (change some logging setup, mount some directories, etc). This means we can't use
serve_from_cli, because we can't useserve_from_cliwe need to reimplement the logic that brings up the fallback server.It would be good to have a way to pass in a callable that modifies the sever between creation and being passed to Uvicorn.
Note that we also supply extra logging information to the fallback server, so we would need a hook for that too.