fix: update serve:http to run main.ts instead of server.ts (#315)

After commit 65a62a9f, the server startup code was moved from server.ts
to main.ts, but the serve:http script was not updated accordingly.

This caused 9 example servers to fail to start when running npm start:
- budget-allocator-server
- cohort-heatmap-server
- customer-segmentation-server
- integration-server
- map-server
- scenario-modeler-server
- system-monitor-server
- threejs-server
- wiki-explorer-server

The server.ts file now only exports createServer(), while main.ts
contains the actual server startup logic.
This commit is contained in:
Maurizio Albari 2026-01-20 18:57:08 +01:00 • committed by GitHub
commit b594fc2dbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ WIDGET_URI = "ui://qr-server/widget.html"
HOST = os.environ.get("HOST", "0.0.0.0") # 0.0.0.0 for Docker compatibility
PORT = int(os.environ.get("PORT", "3108"))
mcp = FastMCP("QR Code Server", port=PORT, stateless_http=True)
mcp = FastMCP("QR Code Server")
@mcp.tool(meta={
@ -92,7 +92,7 @@ if __name__ == "__main__":
mcp.run(transport="stdio")
else:
# HTTP mode for basic-host (default) - with CORS
app = mcp.streamable_http_app()
app = mcp.streamable_http_app(stateless_http=True)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],