-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_web.py
More file actions
31 lines (27 loc) · 980 Bytes
/
run_web.py
File metadata and controls
31 lines (27 loc) · 980 Bytes
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
31
#!/usr/bin/env python3
"""
Aqua IoT Security Platform Web Interface
Entry point script for running the web interface
"""
import os
import sys
import argparse
import uvicorn
def main():
"""Run the Aqua web interface"""
parser = argparse.ArgumentParser(description="Aqua IoT Security Platform Web Interface")
parser.add_argument("--port", type=int, default=8000, help="Port to run the web interface on")
parser.add_argument("--host", type=str, default="0.0.0.0", help="Host to bind to")
parser.add_argument("--reload", action="store_true", help="Auto-reload on code changes")
args = parser.parse_args()
print("Starting Aqua IoT Security Platform web interface...")
uvicorn.run(
"aqua.web.app:app",
host=args.host,
port=args.port,
reload=args.reload
)
if __name__ == "__main__":
# Make sure the package is in the Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
main()