Hello, world

This commit is contained in:
Brian Duggan
2018-05-22 13:37:51 -04:00
parent 6349f7e60e
commit 29248ed76e
4 changed files with 59 additions and 0 deletions

22
app.py Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env python
import tornado.ioloop
import tornado.web
import os
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.render("hello.html.to")
def make_app():
return tornado.web.Application([
(r"/", MainHandler),
],
template_path='./templates',
debug=os.getenv('DEBUG',False),
)
if __name__ == "__main__":
app = make_app()
app.listen(8888)
tornado.ioloop.IOLoop.current().start()