Browse Source

Merge remote-tracking branch 'origin/dev'

changes/37/324637/1
Jan Klare 3 years ago
parent
commit
6ab29e3c43
1 changed files with 20 additions and 0 deletions
  1. 20
    0
      main.py

+ 20
- 0
main.py View File

@@ -0,0 +1,20 @@
1
+from bottle import Bottle
2
+
3
+app = Bottle()
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('/')
10
+def hello():
11
+    """Return a friendly HTTP greeting."""
12
+    return 'Hello World!'
13
+
14
+
15
+# Define an handler for 404 errors.
16
+@app.error(404)
17
+def error_404(error):
18
+    """Return a custom 404 error."""
19
+    return 'Sorry, nothing at this URL.'
20
+Status API Training Shop Blog About

Loading…
Cancel
Save