Skip to content

Commit

Permalink
Automatically launch webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanspauwen committed Jun 11, 2023
1 parent 34a8be9 commit 40dc5d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pystructurizr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import asyncio
import os
import shutil
import subprocess
from .cli_helper import generate_diagram_code, generate_diagram_code_in_child_process
from .cli_watcher import observe_modules

Expand Down Expand Up @@ -54,6 +55,8 @@ async def async_behavior():

async def observe_loop():
await async_behavior()
click.echo("Launching webserver...")
subprocess.Popen(f"httpwatcher --root {tmp_folder} --watch {tmp_folder}", shell=True)
await observe_modules(['example.users', 'example.chatsystem', 'example.containerview', 'example.workspace', 'example', 'pystructurizr.dsl'], async_behavior)

asyncio.run(observe_loop())
Expand Down

0 comments on commit 40dc5d5

Please sign in to comment.