Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch to flask

  • Loading branch information...
commit bfe8474831bb1d2faa96985a1759d5e8601ab36e 1 parent d3ea392
@smerritt authored
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
5 requirements.txt
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.