Last active
May 28, 2018 20:56
-
-
Save clems4ever/6491787bb75a6a3a1b89799bb5bda5dc to your computer and use it in GitHub Desktop.
Python hello-world app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
import os | |
class MyHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() | |
self.wfile.write('<html><head><title>Hello Criteo</title></head><body><h1>Hello Criteo!</h1></body></html>') | |
def log_message(self, format, *args): | |
return | |
httpd = HTTPServer(('', int(os.environ['PORT0'])), MyHandler) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment