@@ -266,7 +266,13 @@ def __init__(
266266 if elasticsearch_config :
267267 self .elasticsearch_client = ElasticsearchClient (elasticsearch_config )
268268
269- super ().__init__ (build_dir , host , port if port is not None else 8000 , index_file )
269+ self .app = FastAPI (title = "Logs Server" )
270+
271+ # Add WebSocket endpoint and API routes
272+ self ._setup_websocket_routes ()
273+ self ._setup_api_routes ()
274+
275+ super ().__init__ (build_dir , host , port if port is not None else 8000 , index_file , self .app )
270276
271277 # Add CORS middleware to allow frontend access
272278 allowed_origins = [
@@ -287,9 +293,12 @@ def __init__(
287293 # Initialize evaluation watcher
288294 self .evaluation_watcher = EvaluationWatcher (self .websocket_manager )
289295
290- # Add WebSocket endpoint and API routes
291- self ._setup_websocket_routes ()
292- self ._setup_api_routes ()
296+ # Log all registered routes for debugging
297+ logger .info ("Registered routes:" )
298+ for route in self .app .routes :
299+ path = getattr (route , "path" , "UNKNOWN" )
300+ methods = getattr (route , "methods" , {"UNKNOWN" })
301+ logger .info (f" { methods } { path } " )
293302
294303 # Subscribe to events and start listening for cross-process events
295304 event_bus .subscribe (self ._handle_event )
0 commit comments