From ea33b7a1e9cf1f5b4c5f699a625187b151bd7702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU?= Date: Fri, 21 Aug 2026 15:05:25 +0200 Subject: [PATCH] WIP, add simple start mode without args and avoid logging in main application --- bootemup/html.py | 6 +++--- bootemup/main.py | 1 + bootemup/routes/start.py | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bootemup/html.py b/bootemup/html.py index d3d9c7c..187f52a 100644 --- a/bootemup/html.py +++ b/bootemup/html.py @@ -102,9 +102,9 @@ async def __call__(self, value): await self.response.write(value) async def maybe(self, value, no_interface): - if no_interface: - # Log to console when interface is disabled - print(">", value.decode("utf-8")) + #if no_interface: + # # Log to console when interface is disabled + # print(">", value.decode("utf-8")) await self(no_interface if config["server"]["disable_interface"] else value) diff --git a/bootemup/main.py b/bootemup/main.py index 012d4ad..cfd0c3a 100644 --- a/bootemup/main.py +++ b/bootemup/main.py @@ -15,6 +15,7 @@ def create_app(): app.add_routes( [ + web.get("/start", start), web.get("/start/{name}", start), web.get("/start/{name}/boot", start), web.get("/stop/{name}", stop), diff --git a/bootemup/routes/start.py b/bootemup/routes/start.py index 4b7edd1..e28580b 100644 --- a/bootemup/routes/start.py +++ b/bootemup/routes/start.py @@ -13,6 +13,8 @@ async def start(request): async with html._page_(full_width=True): async with html._code_(): name = request.match_info.get("name") + if not name: + name = request.url.host.split('.')[0] try: container = await Container.get(name) except ValueError as e: