Skip to content

Instantly share code, notes, and snippets.

@abraham
Created June 30, 2012 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abraham/3025659 to your computer and use it in GitHub Desktop.
Save abraham/3025659 to your computer and use it in GitHub Desktop.
Simple bottlepy app to server an index.html file and static assets
from bottle import get, run, template, static_file, debug
@get('/')
def index(name='World'):
# return "I/O I/O it's off to hack we go"
return template('index.html')
@get('/static/<filename:path>')
def get_static(filename):
return static_file(filename, root='static')
debug(mode=True)
run(host='localhost', port=8080, reloader=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment