Skip to content

Instantly share code, notes, and snippets.

@joetastic
Last active May 17, 2016 15:21
Show Gist options
  • Save joetastic/4e256274bce24f5d2be3313736972555 to your computer and use it in GitHub Desktop.
Save joetastic/4e256274bce24f5d2be3313736972555 to your computer and use it in GitHub Desktop.
import tornado.web
import tornado.options
import logging
class IndexHandler(tornado.web.RequestHandler):
def get(self):
self.finish('oh yeah, i got it')
def main():
tornado.options.parse_command_line()
tornado.web.Application([
(r"/index", IndexHandler),
(r"/somethingelse", SomethingElseHandler),
], debug=True).listen(tornado.options.options.port)
tornado.ioloop.IOLoop.instance().start()
if __name__ =='__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment