Skip to content

Instantly share code, notes, and snippets.

@benhosmer
Created October 21, 2012 11:21
Show Gist options
  • Save benhosmer/3926721 to your computer and use it in GitHub Desktop.
Save benhosmer/3926721 to your computer and use it in GitHub Desktop.
Using bottle with appfog
import os
from bottle import Bottle, route, run
application = app = Bottle()
@app.route('/')
def index(name=['hello', 'World', 'from <a href="http://appfog.com">Appfog!</a>']):
return '<br>'.join(name)
#run(host="0.0.0.0", port=int(os.environ.get("PORT", 5000)), server='gunicorn')
if __name__ == '__main__':
run(app, host='loclhost', port=5000, reloader=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment