Skip to content
Snippets Groups Projects
Commit 4bec0c23 authored by Pierre Michiels's avatar Pierre Michiels
Browse files

07.11.20 22:15

parent c73c760d
No related branches found
No related tags found
No related merge requests found
FROM python:3
ADD server.py /
CMD ["python3","./server.py"]
\ No newline at end of file
<html>
<head>
<title>Python is awesome!</title>
</head>
<body>
<h1>html python server</h1>
<p>Congratulations! The HTTP Server is working!</p>
</body>
</html>
<html><head><title>Python is awesome!</title></head><body><h1>html python server None</h1><p>Congratulations! The HTTP Server is working!</p></body></html>
\ No newline at end of file
import http.server
import socketserver
import os
f = open("index.html", 'w')
htmlCode = "<html><head><title>Python is awesome!</title></head><body><h1>html python server %s" % (os.getenv('HOSTNAME'))
htmlCode += "</h1><p>Congratulations! The HTTP Server is working!</p></body></html>"
f.write(htmlCode)
f.close()
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment