-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_server.py
More file actions
34 lines (28 loc) · 865 Bytes
/
run_server.py
File metadata and controls
34 lines (28 loc) · 865 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
"""
Simple script to run the LeakLens backend server
See what your wallet leaks - Built for encrypt.trade hackathon
"""
import uvicorn
import sys
import os
if __name__ == "__main__":
print("=" * 60)
print(" LeakLens - See What Your Wallet Leaks")
print(" Built for encrypt.trade hackathon")
print("=" * 60)
print("\nStarting server...")
print("API will be available at: http://localhost:8000")
print("API docs will be available at: http://localhost:8000/docs")
print("\nPress Ctrl+C to stop the server\n")
try:
uvicorn.run(
"backend_api:app",
host="0.0.0.0",
port=8000,
reload=True, # Auto-reload on code changes
log_level="info"
)
except KeyboardInterrupt:
print("\n\nServer stopped.")
sys.exit(0)