diff options
| author | Dylan Bolger <dylan.bolger00@gmail.com> | 2026-08-18 11:44:36 -0500 |
|---|---|---|
| committer | Dylan Bolger <dylan.bolger00@gmail.com> | 2026-08-18 11:44:36 -0500 |
| commit | 04892822306bf9a01de19cc70bcfc59d7fca9f8f (patch) | |
| tree | fcc8bc92c5a15b669a657561dfe2ac7e14c72857 /app/main.py | |
| parent | eead346519758f45dd587cfd471f90f6a6a8037f (diff) | |
| download | photoblog-04892822306bf9a01de19cc70bcfc59d7fca9f8f.tar.xz photoblog-04892822306bf9a01de19cc70bcfc59d7fca9f8f.zip | |
move from fastapi to flask, various cleanups involved
Diffstat (limited to 'app/main.py')
| -rw-r--r-- | app/main.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/app/main.py b/app/main.py deleted file mode 100644 index b6adaad..0000000 --- a/app/main.py +++ /dev/null @@ -1,24 +0,0 @@ -from fastapi import FastAPI -from fastapi.staticfiles import StaticFiles -from fastapi.templating import Jinja2Templates -from fastapi.middleware.cors import CORSMiddleware -from .routers import web -from .services import images - -app = FastAPI( - docs_url=None, - redoc_url=None, - openapi_url=None - ) - -origins = ["https://dbolger.dev"] - -app.add_middleware(CORSMiddleware, allow_origins=origins, allow_credentials=True, - allow_methods=["*"], - allow_headers=["*"]) - -app.state.image_service = images -app.state.templates = Jinja2Templates(directory="./app/templates") -app.include_router(web.router) -app.mount("/static", StaticFiles(directory="./app/static"), name="static") -app.mount("/photos", StaticFiles(directory=images.photos_dir), name="photos")
\ No newline at end of file |
