Create attractive VASL scenarios, with loads of useful information embedded to assist with game play.
https://vasl-templates.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
702 B
27 lines
702 B
""" Main webapp handlers. """
|
|
|
|
from flask import request, render_template
|
|
|
|
from vasl_templates.webapp import app
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
@app.route( "/" )
|
|
def main():
|
|
"""Return the main page."""
|
|
return render_template( "index.html" )
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
@app.route( "/ping" )
|
|
def ping():
|
|
"""Let the caller know we're alive."""
|
|
return "pong"
|
|
|
|
# ---------------------------------------------------------------------
|
|
|
|
@app.route( "/shutdown" )
|
|
def shutdown():
|
|
"""Shutdown the webapp (for testing porpoises)."""
|
|
request.environ.get( "werkzeug.server.shutdown" )()
|
|
return ""
|
|
|