Skip to content

POOJASREE-B/Web_server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEVELOPING A SIMPLE WEBSERVER

NAME : Poojasree B

REFERENCE NUMBER : 23012790

DEPARTMENT : Computer science and engineering(CSE)

AIM:

Develop a webserver to display about top five web application development frameworks.

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= """
<html>
<head>
</head>
<body>
<h1>welcome</h1>
</body>
</html>
"""
class HelloHandler(BasedHTTPRequestHandler):
    def do_GET(self):
        self.send-response(200)
        self.send_header('content-type','text/html;charset=utf-8')
        self.end_heardes()
        self.wfile.write(content.encode())

server_address=('',80)
httpdd=HTTPServer(server_address,HelloHandler)
httpd.serve_forever()

OUTPUT:

Alt text

RESULT:

The program is executed succesfully.

About

Creating a sample web server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors