developer-portfolios/JonathanMyPortfolio/serve_static.py

9 lines
231 B
Python
Raw Normal View History

2025-03-31 20:26:11 +00:00
import http.server
import socketserver
PORT = 5000
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd:
print(f"Serving at http://0.0.0.0:{PORT}")
httpd.serve_forever()