Skip to content

Conversation

@MehakBindra
Copy link
Contributor

@MehakBindra MehakBindra commented Oct 23, 2025

Tested with code like (check running on and activities received on port 8000 )

def make_server(app: FastAPI) -> uvicorn.Server:
    config = uvicorn.Config(
        app=app,
        host="0.0.0.0",
        port=8000,
        log_level="debug",
    )
    return uvicorn.Server(config)


app = App(
    plugins=[
        DevToolsPlugin(),
        HttpPlugin(app_id=None, server_factory=make_server),
    ]
)

Copilot AI review requested due to automatic review settings October 23, 2025 22:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for custom server configuration in the HTTPPlugin by introducing a server_factory parameter. This enables users to provide their own pre-configured uvicorn server with custom options like SSL certificates, custom logging, or other server-level configurations.

Key Changes:

  • Added optional server_factory parameter to HTTPPlugin constructor
  • Modified startup logic to use custom server when provided, with port conflict detection
  • Added documentation for the new parameter

Copy link
Collaborator

@heyitsaamir heyitsaamir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline. This makes sense to me. Add the code comment and 🚢

@MehakBindra MehakBindra merged commit 564fa26 into main Nov 4, 2025
7 checks passed
@MehakBindra MehakBindra deleted the mehak/server branch November 4, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants