-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
38 lines (33 loc) · 1.33 KB
/
Copy pathrun.py
File metadata and controls
38 lines (33 loc) · 1.33 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
31
32
33
34
35
36
37
38
"""Crypto Intelligence Terminal v1.0 - server (startup panel -> CONFIRM -> dashboard)."""
import os, sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
def disable_quickedit():
"""Disable Windows Console QuickEdit so the app keeps running when minimized."""
if os.name != "nt":
return
try:
import ctypes
from ctypes import wintypes
k = ctypes.windll.kernel32
h = k.GetStdHandle(-10)
mode = wintypes.DWORD()
if k.GetConsoleMode(h, ctypes.byref(mode)):
nm = mode.value | 0x0080 # ENABLE_EXTENDED_FLAGS
nm &= ~0x0040 # QuickEdit OFF
nm &= ~0x0010 # mouse input OFF
k.SetConsoleMode(h, nm)
print("[OK] Console QuickEdit disabled - stays alive when minimized.")
except Exception:
pass
import uvicorn
from config.settings import settings
if __name__ == "__main__":
disable_quickedit()
print("""
=================================================
CRYPTO INTELLIGENCE TERMINAL v1.0
Startup Panel -> CONFIRM -> Dashboard
=================================================
""")
print(f" Open: http://localhost:{settings.app_port}\n")
uvicorn.run("backend.main:app", host=settings.app_host, port=settings.app_port, reload=False, log_level="info")