did:cow, a proposal for an ID resolution method with most of the convenience of did:plc/did:web and the robustness of a public blockchain
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove web server as we're serving the static files through nginx

-23
-23
web/web.py
··· 1 - #!/usr/bin/env python3 2 - """Static file server for the did:cow web UI (dev use — in prod, copy to nginx webroot).""" 3 - 4 - import http.server 5 - import os 6 - from pathlib import Path 7 - 8 - PORT = 6667 9 - DIRECTORY = Path(__file__).parent / "static" 10 - 11 - 12 - class Handler(http.server.SimpleHTTPRequestHandler): 13 - def __init__(self, *args, **kwargs): 14 - super().__init__(*args, directory=str(DIRECTORY), **kwargs) 15 - 16 - def log_message(self, format, *args): 17 - print(f"{self.address_string()} {format % args}") 18 - 19 - 20 - if __name__ == "__main__": 21 - with http.server.HTTPServer(("", PORT), Handler) as httpd: 22 - print(f"Serving {DIRECTORY} at http://localhost:{PORT}") 23 - httpd.serve_forever()