Skip to content
Browse files

adding .gitignore and preparing for deploy on heroku

  • Loading branch information...
1 parent b874f4d commit d6aec5943af5cda3fd9f25f3e689bb6a6456d9b5 @madewulf committed Sep 6, 2012
Showing with 7 additions and 8 deletions.
  1. +2 −0 .gitignore
  2. +5 −8 site.py
View
2 .gitignore
@@ -0,0 +1,2 @@
+venv
+*.pyc
View
13 site.py
@@ -50,12 +50,9 @@ def pyramid(country="WORLD",year="2010",currentLetter=None):
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'), 404
-
+import os
if __name__ == '__main__':
- with app.test_request_context():
- pass
- #print url_for('/')
- #print "url_for %s"% url_for('static', filename='css/base.css')
- #print "pyramid %s"% url_for('pyramid', country='brol', year=2010)
- app.debug = True
- app.run()
+ if __name__ == '__main__':
+ # Bind to PORT if defined, otherwise default to 5000.
+ port = int(os.environ.get('PORT', 5000))
+ app.run(host='0.0.0.0', port=port)

0 comments on commit d6aec59

Please sign in to comment.
Something went wrong with that request. Please try again.