Refactor server startup functions

Rename `startServer` to `startStreamableHTTPServer` and add a new
`startStdioServer` helper to make the transport type explicit. Remove
the `ServerOptions` interface in favor of reading `PORT` directly from
the environment inside the function (defaulting to `3001`).

Also update Python examples to default to port `3001` for consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jonathan Hefner 2026-01-23 09:51:29 -06:00
commit 6eb82b5562
No known key found for this signature in database
GPG key ID: 0DA40AFD21043691

View file

@ -58,7 +58,7 @@ logger = logging.getLogger(__name__)
VIEW_URI = "ui://say-demo/view.html"
HOST = os.environ.get("HOST", "0.0.0.0")
PORT = int(os.environ.get("PORT", "3109"))
PORT = int(os.environ.get("PORT", "3001"))
# Speaker icon as SVG data URI
SPEAKER_ICON = Icon(