Created
June 30, 2012 21:50
-
-
Save abraham/3025659 to your computer and use it in GitHub Desktop.
Simple bottlepy app to server an index.html file and static assets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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