To develop a simple webserver to serve html pages.
HTML content creation
Design of webserver workflow
Implementation using Python code
Serving the HTML pages.
Testing the webserver
from http.server import HTTPServer,BaseHTTPRequestHandel content ="""
<title>My webserver</title>
NAME: sarveshkaran
Ref No: 21000082
E-mail: sarveshaugusto2419@gmail.com
""" class myhandle(BaseHTTPRequestHandler): def do_GET(sefl):print("request received) self.send_response(200) I text/html; charset=utf-8') self.end_headers() self.wfile.write(content.encode()) server_address = (",8080) httpd
HTTPServer(server_address,myhandler) print("my webserver is running...") httpd.serve_forever()
Thus the program run successfully
