Created
December 25, 2015 05:45
-
-
Save xiantail/a46110c9821f20956701 to your computer and use it in GitHub Desktop.
Introducing Python / Chapter 9
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 route, run, static_file | |
@route('/') | |
def main(): | |
return static_file('index.html', root='.') | |
@route('/echo/<thing>') | |
def echo(thing): | |
return "Say hello to my littel friend: %s" % thing | |
run(host='localhost', port=9999) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment