Framework setup
This commit is contained in:
12
src/allmende_payment_system/app.py
Normal file
12
src/allmende_payment_system/app.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# backend/app/main.py
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.templating import Jinja2Templates
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
app = FastAPI()
|
||||
templates = Jinja2Templates(directory="src/allmende_payment_system/templates")
|
||||
app.mount("/static", StaticFiles(directory="src/allmende_payment_system/static"), name="static")
|
||||
|
||||
@app.get("/")
|
||||
async def landing_page(request: Request):
|
||||
return templates.TemplateResponse("index.html.jinja", {"request": request})
|
||||
Reference in New Issue
Block a user