21 lines
452 B
Python
21 lines
452 B
Python
from bottle import Bottle
|
|
|
|
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!'
|
|
|
|
|
|
# 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
|