Skip to content

Instantly share code, notes, and snippets.

@kzk
Created September 18, 2011 18:34
Show Gist options
  • Save kzk/1225369 to your computer and use it in GitHub Desktop.
Save kzk/1225369 to your computer and use it in GitHub Desktop.
cat >hello.py <<EOF
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
application = tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
application.listen(18888)
tornado.ioloop.IOLoop.instance().start()
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment