first panda image added
This commit is contained in:
parent
6ab29e3c43
commit
b835ab2113
BIN
images/v1/sad_panda01.png
Normal file
BIN
images/v1/sad_panda01.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 43 KiB |
16
main.py
16
main.py
@ -1,20 +1,14 @@
|
||||
from bottle import Bottle
|
||||
from bottle import Bottle, run, static_file
|
||||
|
||||
app = Bottle()
|
||||
|
||||
# Note: We don't need to call run() since our application is embedded within
|
||||
# the App Engine WSGI application server.
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def hello():
|
||||
"""Return a friendly HTTP greeting."""
|
||||
return 'Hello World!'
|
||||
|
||||
@app.route('/v1/<filename:re:.*\.png>')
|
||||
def show_pic(filename):
|
||||
return static_file(filename, root='images/v1/')
|
||||
|
||||
# Define an handler for 404 errors.
|
||||
@app.error(404)
|
||||
def error_404(error):
|
||||
"""Return a custom 404 error."""
|
||||
return 'Sorry, nothing at this URL.'
|
||||
Status API Training Shop Blog About
|
||||
run(app, host='localhost', port=8080, debug=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user