Skip to content

Instantly share code, notes, and snippets.

@clems4ever
Last active May 28, 2018 20:56
Show Gist options
  • Save clems4ever/6491787bb75a6a3a1b89799bb5bda5dc to your computer and use it in GitHub Desktop.
Save clems4ever/6491787bb75a6a3a1b89799bb5bda5dc to your computer and use it in GitHub Desktop.
Python hello-world app
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