export all server objects to a file for static deployments and demo for logo

This commit is contained in:
Yeicor
2024-02-10 20:37:28 +01:00
parent 3804ae5376
commit 0545d8fbe2
6 changed files with 126 additions and 43 deletions

View File

@@ -15,12 +15,16 @@ if 'YACV_DISABLE_SERVER' not in os.environ:
# the environment variable YACV_DISABLE_SERVER to a non-empty value
server.start()
# Expose some nice aliases using the default server instance
show = server.show
show_object = show
def _get_app() -> web.Application:
"""Required by aiohttp-devtools"""
logging.basicConfig(level=logging.DEBUG)
from logo.logo import build_logo
server.show_object(build_logo(), 'logo')
server.show_cad(build_logo(), 'logo')
return server.app