Frontend (SPA)
Section titled “Frontend (SPA)”Sillo no longer includes a built-in FrontendApp or app.frontend() helper.
For serving static files and single-page applications, use one of the following approaches:
Using a reverse proxy
Section titled “Using a reverse proxy”The recommended production setup is to serve static assets from a reverse proxy or CDN in front of the Sillo application:
# nginx examplelocation / { proxy_pass http://127.0.0.1:8000;}
location /static/ { alias /path/to/dist/; expires 1y;}Using StaticFiles
Section titled “Using StaticFiles”For development or simple deployments, mount Starlette’s StaticFiles directly:
from starlette.staticfiles import StaticFiles
app = SilloApp()app.mount("/static", StaticFiles(directory="dist"), name="static")Custom ASGI middleware
Section titled “Custom ASGI middleware”For SPA fallback routing, write a small ASGI middleware or mount a custom
BaseRouter subclass. This gives you full control over caching, fallback
behaviour, and security headers.