Commit 2d22f526 authored by Sorrel Harriet's avatar Sorrel Harriet
Browse files

Merge branch 'master' of gitlab.doc.gold.ac.uk:data-networks-web/lab-exercises

parents 15d527c6 fd88bc0d
......@@ -3,20 +3,20 @@
""" A Very Simple Web Server
Run with ./verySimpleServer.py
Make sure all cgi scripts are executable
for single script:
chmod +x script.py
Make sure all scripts are executable
e.g. for single script:
chmod +x verySimpleServer.py
or for a whole directory:
chmod -r +x htdocs/
"""
import http.server
PORT = 8000 # specifies the port number to accept connections on
PORT = 8000 # specifies the port number to accept connections on
server = http.server.HTTPServer # instantiates an HTTP server object
handler = http.server.SimpleHTTPRequestHandler # instantiates a request handler object
server_address = ("", PORT) # specifies server directory and port number
server = http.server.HTTPServer # instantiates an HTTP server object
handler = http.server.SimpleHTTPRequestHandler # instantiates a request handler object
server_address = ("", PORT) # specifies server directory and port number
print("Starting server...") # outputs a message
httpd = server(server_address, handler) # creates the server which will listen at the HTTP socket, dispatching requests to the handler
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment