From ad995affd5b6111cb1cdf02c5ac2109d24ff2fd4 Mon Sep 17 00:00:00 2001 From: TylerCG <117808427+TylerCG@users.noreply.github.com> Date: Sat, 19 Apr 2025 23:24:48 -0400 Subject: [PATCH] Initial Create --- Dockerfile | 0 app/__pycache__/main.cpython-313.pyc | Bin 0 -> 942 bytes app/main.py | 16 ++++++++++++++++ app/templates/index.html | 9 +++++++++ requirements.txt | 0 5 files changed, 25 insertions(+) create mode 100644 Dockerfile create mode 100644 app/__pycache__/main.cpython-313.pyc create mode 100644 app/main.py create mode 100644 app/templates/index.html create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/app/__pycache__/main.cpython-313.pyc b/app/__pycache__/main.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73b097b4df56504284af5879b517e4a0202637f1 GIT binary patch literal 942 zcmYLH&r2Io5PolWvzv8IY_%elv}~;&qL2kqsvw1eSevvWS)~U9vL-Ld+WnEfw}Hk} ztcQB-q2SSDd+V{s{t1R23J;_$?ZumtQ*WJ@WSfCEGvB;{wWKit`ecOo63>oL8vQ^W{P!uTr(=D+Mi|q)8K%@C;fWJVW)8 zUYv{{A6h$6O3ol#wY60YI=L!CoeB|MM5qB(cZb=rXOEN=+gO$C(UPwluwV8Z#<)iN1C(+6 z6<}33CvduJpdKOf1Gg4zGj2U&@xp^|GpVa%x!z=puLVhV=j^b(mE+2o7XE+dp#QOhIL zS`W)jp9B%Jp1RRy^T1*)&vOo%%yJqH%Xi!$*JyE_5~s3H!!V)~@Q7&3?t{8QZS=>u z^WB*17<1>|SM6elc9z&TBf3zczf6IYx6>KCl}&T43M+IPE){f8al>y9Lb;e@MiU}F z9>)i}aDy5Z6!VGrqQAka*eeykIG15sp76tF5cNrrYotHxC)9-mM8`#1a?KAbO^-aL z_W%k$SQXT@j4}R!W-rnFCCXi*ghXQlSk1)jf_FmB?rmt7=mS4PspO)o?<(CQx;*X!Q^ literal 0 HcmV?d00001 diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..8d5f969 --- /dev/null +++ b/app/main.py @@ -0,0 +1,16 @@ +from fastapi import FastAPI, Request +from fastapi.responses import HTMLResponse +from fastapi.templating import Jinja2Templates +from fastapi.staticfiles import StaticFiles + +app = FastAPI() + +# Mount static files if needed (e.g. CSS, JS, images) +app.mount("/static", StaticFiles(directory="static"), name="static") + +# Jinja2 template directory +templates = Jinja2Templates(directory="templates") + +@app.get("/", response_class=HTMLResponse) +async def read_root(request: Request): + return templates.TemplateResponse("index.html", {"request": request, "message": "Hello from FastAPI + Jinja2!"}) diff --git a/app/templates/index.html b/app/templates/index.html new file mode 100644 index 0000000..81cc744 --- /dev/null +++ b/app/templates/index.html @@ -0,0 +1,9 @@ + + + + FastAPI with Jinja2 + + +

{{ message }}

+ + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29