Skip to content

yuvaram444/simplewebserver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

EX01 Developing a Simple Webserver

Date:

24-10-2024

AIM:

To develop a simple webserver to serve html pages and display the configuration details of laptop.

DESIGN STEPS:

Step 1:

HTML content creation.

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>
</table>
'''

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 =('',8000) httpd = HTTPServer(server_address,MyServer) httpd.serve_forever() '''

OUTPUT:

wehex01

RESULT:

The program for implementing simple webserver is executed successfully.

Configuration Description
Processor 13th intel(R) core(TM) i5-1335U, 1300Mhz, 10 Core(s), 12 Logical Processor
Storage(HDD/SSD)SAMSUNG MZAL4512HBLU-00BL1
Memory8.5 GB
Graphics Card Intel(R) Iris(R) Xe Graphics , NVIDIA GeForce MX550
Operating SystemEdition:Windows , Version:22H2 , OS build:22621.4169
RAM16.0 GB

About

yuvaram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • HTML 1.0%