generated from hjess/PythonTemplateProject
Loads of boiler plating
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 38s
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 38s
This commit is contained in:
3
app.py
3
app.py
@@ -5,10 +5,13 @@ from fastapi.templating import Jinja2Templates
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from starlette.middleware.httpsredirect import HTTPSRedirectMiddleware
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
# Mount static files
|
# Mount static files
|
||||||
app.mount("/static", StaticFiles(directory="static"), name="static")
|
app.mount("/static", StaticFiles(directory="static"), name="static")
|
||||||
|
app.add_middleware(HTTPSRedirectMiddleware)
|
||||||
|
|
||||||
# Templates directory
|
# Templates directory
|
||||||
templates = Jinja2Templates(directory="templates")
|
templates = Jinja2Templates(directory="templates")
|
||||||
|
|||||||
Reference in New Issue
Block a user