added middelware
Some checks failed
Build, Push, and Deploy to Nomad / docker-nomad (push) Has been cancelled

This commit is contained in:
2024-12-10 22:41:10 +01:00
parent 669098e568
commit 31f0f49dec
3 changed files with 2502 additions and 1816 deletions

11
app.py
View File

@@ -1,3 +1,4 @@
import uvicorn
from fastapi import FastAPI, Request from fastapi import FastAPI, Request
from fastapi.staticfiles import StaticFiles from fastapi.staticfiles import StaticFiles
from fastapi.responses import HTMLResponse from fastapi.responses import HTMLResponse
@@ -54,3 +55,13 @@ async def get_category(request: Request, category_name: str):
}, },
) )
return HTMLResponse("Kategori ikke fundet", status_code=404) return HTMLResponse("Kategori ikke fundet", status_code=404)
# Main entry point
def main():
"""Run the FastAPI app directly"""
uvicorn.run("app:app", host="0.0.0.0", port=8000, reload=True, proxy_headers=True)
# Run main when executed directly
if __name__ == "__main__":
main()

File diff suppressed because it is too large Load Diff

View File

@@ -9,20 +9,20 @@
body, input, select, textarea { body, input, select, textarea {
color: _palette(fg); color: _palette(fg);
font-family: _font(family); font-family: _font(family);
font-size: 13pt; font-size: 16pt;
font-weight: _font(weight); font-weight: _font(weight);
line-height: 1.65; line-height: 1.65;
@include breakpoint('<=xlarge') { @include breakpoint('<=xlarge') {
font-size: 11pt; font-size: 13pt;
} }
@include breakpoint('<=large') { @include breakpoint('<=large') {
font-size: 10pt; font-size: 11pt;
} }
@include breakpoint('<=xxsmall') { @include breakpoint('<=xxsmall') {
font-size: 9pt; font-size: 10pt;
} }
} }