Permalink
Browse files

Switch to flask

  • Loading branch information...
1 parent d3ea392 commit bfe8474831bb1d2faa96985a1759d5e8601ab36e @smerritt committed Feb 9, 2012
Showing with 11 additions and 12 deletions.
  1. +7 −11 app.py
  2. +4 −1 requirements.txt
View
18 app.py
@@ -1,16 +1,12 @@
import os
-import tornado.ioloop
-import tornado.web
+import sqlalchemy
+from flask import Flask
-class MainHandler(tornado.web.RequestHandler):
- def get(self):
- self.write("Hello, world")
+app = Flask(__name__)
-application = tornado.web.Application([
- (r"/", MainHandler),
-])
+@app.route("/")
+def hello():
+ return "Hello World!"
if __name__ == "__main__":
- port = int(os.environ.get('PORT', 5000))
- application.listen(port)
- tornado.ioloop.IOLoop.instance().start()
+ app.run()
View
@@ -1,3 +1,6 @@
+Flask==0.8
+Jinja2==2.6
+SQLAlchemy==0.7.5
+Werkzeug==0.8.3
distribute==0.6.24
-tornado==2.2
wsgiref==0.1.2

0 comments on commit bfe8474

Please sign in to comment.