summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Klare <j.klare@cloudbau.de>2016-04-26 18:05:39 -0500
committerJan Klare <j.klare@cloudbau.de>2016-04-26 18:05:39 -0500
commitb835ab2113da27d5c747b9e984eb74ddd19a3f8b (patch)
tree42588a80e40682878ffdd488f970f0bdb7db6e90
parent6ab29e3c434c106fd34ac7ef141cf1b16cb6e177 (diff)
first panda image added
-rw-r--r--images/v1/sad_panda01.pngbin0 -> 44227 bytes
-rw-r--r--main.py16
2 files changed, 5 insertions, 11 deletions
diff --git a/images/v1/sad_panda01.png b/images/v1/sad_panda01.png
new file mode 100644
index 0000000..1dd8ce1
--- /dev/null
+++ b/images/v1/sad_panda01.png
Binary files differ
diff --git a/main.py b/main.py
index de16cba..9fee2fe 100644
--- a/main.py
+++ b/main.py
@@ -1,20 +1,14 @@
1from bottle import Bottle 1from bottle import Bottle, run, static_file
2 2
3app = Bottle() 3app = Bottle()
4 4
5# Note: We don't need to call run() since our application is embedded within
6# the App Engine WSGI application server.
7
8
9@app.route('/') 5@app.route('/')
10def hello(): 6def hello():
11 """Return a friendly HTTP greeting.""" 7 """Return a friendly HTTP greeting."""
12 return 'Hello World!' 8 return 'Hello World!'
13 9
10@app.route('/v1/<filename:re:.*\.png>')
11def show_pic(filename):
12 return static_file(filename, root='images/v1/')
14 13
15# Define an handler for 404 errors. 14run(app, host='localhost', port=8080, debug=True)
16@app.error(404)
17def error_404(error):
18 """Return a custom 404 error."""
19 return 'Sorry, nothing at this URL.'
20Status API Training Shop Blog About