Housekeeping

- Moving to HTMX integration
- Improving links for local use
- File structure
- Hiding clutter
This commit is contained in:
MrTeferi
2022-11-21 16:17:13 -06:00
parent 70c8990024
commit 432bdc998b
34 changed files with 202 additions and 457 deletions

24
serve.py Normal file
View File

@@ -0,0 +1,24 @@
# Python 3 server example
from http.server import SimpleHTTPRequestHandler, HTTPServer
import os
NAME = "localhost"
PORT = 8080
DIRECTORY = os.getcwd()
class Handler(SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, directory=DIRECTORY, **kwargs)
if __name__ == "__main__":
webServer = HTTPServer((NAME, PORT), Handler)
print("Server started http://%s:%s" % (NAME, PORT))
try:
webServer.serve_forever()
except KeyboardInterrupt:
pass
webServer.server_close()
print("Server stopped.")