Skip to content

Naveenganesan1/webserver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Developing a Simple Webserver

Name : Naveen G
Reference No. : 23005145

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=''' <!doctype html>

<title> My Web Server</title>

Top Five Web Application Development Frameworks

1.Django

2. MEAN Stack

3. React

'''

class MyServer(BaseHTTPRequestHandler): def do_GET(self): print("Get request received...") self.send_response(200) self.send_header("content-type", "text/html")
self.end_headers() self.wfile.write(content.encode())

print("This is my webserver") server_address =('',8007) httpd = HTTPServer(server_address,MyServer) httpd.serve_forever()

OUTPUT:

serveroutput:

serveroutput

clientouput:

clientoutput

RESULT:

The program is executed succesfully

About

This is my first project

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors