-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrun_server.py
More file actions
29 lines (24 loc) · 820 Bytes
/
Copy pathrun_server.py
File metadata and controls
29 lines (24 loc) · 820 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
import sys
import os
# Add the project root directory to Python path
project_root = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, project_root)
# Read environment variables directly
env_path = os.path.join(project_root, '.env')
env_vars = {}
with open(env_path, 'r') as f:
for line in f:
line = line.strip()
if line and not line.startswith('#'):
key, value = line.split('=', 1)
os.environ[key.strip()] = value.strip()
print(f"Wallet Address: {os.environ.get('WALLET_ADDRESS')}")
# Import and run the Flask app
from src.flask_dashboard import app
from hypercorn.config import Config
from hypercorn.asyncio import serve
import asyncio
if __name__ == '__main__':
config = Config()
config.bind = ["localhost:5000"]
asyncio.run(serve(app, config))