Skip to content

Instantly share code, notes, and snippets.

@flyer103
Created July 1, 2014 03:19
Show Gist options
  • Save flyer103/1d95fd1dd3a34d89c3ad to your computer and use it in GitHub Desktop.
Save flyer103/1d95fd1dd3a34d89c3ad to your computer and use it in GitHub Desktop.
用来演示简单的 web 开发
#!/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