diff options
| author | Dylan Bolger <dylan.bolger00@gmail.com> | 2026-08-17 16:58:04 -0500 |
|---|---|---|
| committer | Dylan Bolger <dylan.bolger00@gmail.com> | 2026-08-17 16:58:04 -0500 |
| commit | a06a7e8f23bfd64565da4e4141f186180e84a104 (patch) | |
| tree | 297a4fb79bccdb94cda9eaccecc4af9cc9766210 /app/main.py | |
| download | photoblog-a06a7e8f23bfd64565da4e4141f186180e84a104.tar.xz photoblog-a06a7e8f23bfd64565da4e4141f186180e84a104.zip | |
initial push of photoblog
Diffstat (limited to 'app/main.py')
| -rw-r--r-- | app/main.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..fac1daa --- /dev/null +++ b/app/main.py @@ -0,0 +1,12 @@ +from fastapi import FastAPI +from fastapi.staticfiles import StaticFiles +from fastapi.templating import Jinja2Templates +from .routers import web +from .services import images + +app = FastAPI() +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 |
