Browse Source

Merge pull request #842 from Viicos/run-with-path

Add a `mount_path` parameter to `run_with`
Falko Schindler 2 years ago
parent
commit
97e6e292a2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      nicegui/run_with.py

+ 2 - 1
nicegui/run_with.py

@@ -14,6 +14,7 @@ def run_with(
     dark: Optional[bool] = False,
     binding_refresh_interval: float = 0.1,
     exclude: str = '',
+    mount_path: str = '/',
 ) -> None:
     globals.ui_run_has_been_called = True
     globals.title = title
@@ -27,4 +28,4 @@ def run_with(
     app.on_event('startup')(lambda: handle_startup(with_welcome_message=False))
     app.on_event('shutdown')(lambda: handle_shutdown())
 
-    app.mount('/', globals.app)
+    app.mount(mount_path, globals.app)