Created
February 11, 2021 20:54
-
-
Save an01f01/bcd0892b466411472c9ae6b53b10ee7d to your computer and use it in GitHub Desktop.
This file contains 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
# Define web app | |
# (The only routes that contain "." should be static files, the "." is neccessary for the extension | |
# dont make new, non-static routes containing "." or else the static file handler will attempt to handle the request) | |
application = tornado.web.Application([ | |
(r"/", StatusHandler), | |
], **settings) | |
application.listen(80) | |
http_server = tornado.httpserver.HTTPServer( | |
application, | |
ssl_options = { | |
"certfile": os.path.join("../certs/", "ssl_app_cert.crt"), | |
"keyfile": os.path.join("../certs/", "ssl_app_key.key")' | |
}) | |
# Start web app | |
http_server.listen(443) | |
tornado.ioloop.IOLoop.instance().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment