π OpenHands: AI-Driven Development
add an option for a headless backend (#8032)
Robert Brennan5de62d85fdcd
diff --git a/openhands/server/listen.py b/openhands/server/listen.pyindex 7bcc3ad9ef..afda98d327 100644--- a/openhands/server/listen.py+++ b/openhands/server/listen.py@@ -1,3 +1,5 @@+import os+import socketiofrom openhands.server.app import app as base_app@@ -12,9 +14,10 @@ from openhands.server.middleware import ()from openhands.server.static import SPAStaticFiles-base_app.mount(- '/', SPAStaticFiles(directory='./frontend/build', html=True), name='dist'-)+if os.getenv('SERVE_FRONTEND', 'true').lower() == 'true':+ base_app.mount(+ '/', SPAStaticFiles(directory='./frontend/build', html=True), name='dist'+ )base_app.add_middleware(LocalhostCORSMiddleware,