Created
July 1, 2014 03:19
-
-
Save flyer103/1d95fd1dd3a34d89c3ad to your computer and use it in GitHub Desktop.
用来演示简单的 web 开发
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
"""简单的 web 开发,基于 tornado | |
""" | |
import tornado.web | |
import tornado.ioloop | |
class RootHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write('Who will cook? :D') | |
if __name__ == '__main__': | |
app = tornado.web.Application([ | |
(r'/test', RootHandler), | |
]) | |
app.listen(9300) | |
tornado.ioloop.IOLoop.instance().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment