Skip to content

Instantly share code, notes, and snippets.

@stevepeak
Last active March 13, 2017 22:15
Show Gist options
  • Save stevepeak/9f392f9a17f36dd02bf26ad4d37bf686 to your computer and use it in GitHub Desktop.
Save stevepeak/9f392f9a17f36dd02bf26ad4d37bf686 to your computer and use it in GitHub Desktop.
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
def make_app():
return tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
app = make_app()
app.listen(5000)
tornado.ioloop.IOLoop.current().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment