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.
 
 
 
 
 
 
vasl-templates/vasl_templates/webapp/run_server.py

27 lines
786 B

#!/usr/bin/env python3
""" Run the webapp server. """
import os
import glob
# ---------------------------------------------------------------------
# monitor extra files for changes
extra_files = []
for fspec in ["config","static","templates"] :
fspec = os.path.abspath( os.path.join( os.path.dirname(__file__), fspec ) )
if os.path.isdir( fspec ):
files = [ os.path.join(fspec,f) for f in os.listdir(fspec) ]
files = [ f for f in files if os.path.isfile(f) and os.path.splitext(f)[1] not in [".swp"] ]
else:
files = glob.glob( fspec )
extra_files.extend( files )
# run the server
from vasl_templates.webapp import app
app.run(
host = "localhost",
port = app.config["FLASK_PORT_NO"],
debug = True,
extra_files = extra_files
)