diff --git a/main.py b/main.py index 31c7fb2..b0456a7 100644 --- a/main.py +++ b/main.py @@ -1,2 +1,53 @@ -print("hello") -print("hello from the internet!") +from http.server import BaseHTTPRequestHandler, HTTPServer + +class MyServerHandler(BaseHTTPRequestHandler): + def do_GET(self): + if self.path == '/': + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + + html = """ + +
This is a simple preview. wow coool. so cool
+ Go to Subpage + + + """ + self.wfile.write(html.encode("utf-8")) + + elif self.path == '/subpage': + self.send_response(200) + self.send_header("Content-type", "text/html") + self.end_headers() + + html = """ + +