-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·30 lines (25 loc) · 1.35 KB
/
Copy pathrun.py
File metadata and controls
executable file
·30 lines (25 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
"""
Quick start script for TFVisualizer
Runs the Flask development server
"""
import os
from app.main import create_app
if __name__ == '__main__':
app = create_app()
# Default to 8080 for local development to avoid requiring root for port 80
port = int(os.environ.get('PORT', 8080))
debug = os.environ.get('FLASK_ENV') == 'development'
print(f"""
╔════════════════════════════════════════════════════╗
║ ║
║ 🌐 TFVisualizer Starting... ║
║ ║
║ Landing Page: http://localhost:{port if port != 80 else ''} ║
║ Editor: http://localhost:{port if port != 80 else ''}/editor ║
║ API Docs: http://localhost:{port if port != 80 else ''}/api ║
║ Health Check: http://localhost:{port if port != 80 else ''}/health ║
║ ║
╚════════════════════════════════════════════════════╝
""")
app.run(host='0.0.0.0', port=port, debug=debug)