Skip to content

VELANDHANANJAYAN/webserver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Developing a Simple Webserver

AIM:

To develop a simple webserver to serve html programming pages.

DESIGN STEPS:

Step 1:

HTML content creation is done

Step 2:

Design of webserver workflow

Step 3:

Implementation using Python code

Step 4:

Serving the HTML pages.

Step 5:

Testing the webserver

PROGRAM:

''' from http.server import HTTPServer,BaseHTTPRequestHandler

content ="""

Welcome to the webserver

"""

class WebHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('content-type','text/html; charset=utf-8') self.end_headers() self.wfile.write(content.encode())

server_address=('',8000) httpd=HTTPServer(server_address,WebHandler) print("Web server running...") httpd.serve_forever()
'''

OUTPUT:

Server side output

Server side output ###Client side output Server side output

RESULT:

The program is executed succesfully

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages