19 lines
478 B
Python
19 lines
478 B
Python
#!/usr/bin/env python3
|
|
"""Start dashboard dev server and print the URL."""
|
|
import http.server
|
|
import os
|
|
import socketserver
|
|
import sys
|
|
|
|
PORT = 9176
|
|
DIR = "/home/satoshi/ftdt-quant-lab/backtests/reports"
|
|
os.chdir(DIR)
|
|
|
|
class MyHandler(http.server.SimpleHTTPRequestHandler):
|
|
def log_message(self, fmt, *args):
|
|
pass # quiet
|
|
|
|
with socketserver.TCPServer(("0.0.0.0", PORT), MyHandler) as httpd:
|
|
print(f"Dashboard: http://localhost:{PORT}")
|
|
httpd.serve_forever()
|