Skip to content

Commit

Permalink
simplify serve
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 30, 2024
1 parent bb4f879 commit 0a7294a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__pycache__/
*.py[cod]
*$py.class

.vscode/
# C extensions
*.so

Expand Down
3 changes: 3 additions & 0 deletions src/textual_dev/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ def serve(
"""
from textual_serve.server import Server

if " " not in command and command.endswith(".py"):
command = f"python {command}"

server = Server(command, host, port, title=title, public_url=url)
server.serve(debug=dev)

Expand Down

0 comments on commit 0a7294a

Please sign in to comment.