add support for running the server on local network in debug

This commit is contained in:
2026-05-29 01:13:32 +03:00
parent dc1ff4446e
commit b0793b8a86
2 changed files with 8 additions and 4 deletions

View File

@@ -1,10 +1,15 @@
from app import create_app
import os
import sys
app = create_app()
if __name__ == "__main__":
if len(sys.argv) > 1 and sys.argv[1] == '-d':
hostname = '0.0.0.0'
else:
hostname = '127.0.0.1'
app.run(
host = "127.0.0.1",
host = hostname,
port = 8080
)