Skip to content

Add hooks for server customisation #263

@julianstirling

Description

@julianstirling

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions