Basic app, mainly copied from tmpl-flask
This commit is contained in:
parent
354a473f77
commit
bfea5eeb06
20 changed files with 446 additions and 49 deletions
0
app/__init__.py
Normal file
0
app/__init__.py
Normal file
19
app/main.py
Normal file
19
app/main.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import secrets
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
from pydantic import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
secret_key: str = secrets.token_hex(32)
|
||||
|
||||
|
||||
settings = Settings()
|
||||
app = FastAPI()
|
||||
app.mount(
|
||||
'/static',
|
||||
StaticFiles(directory='../static'),
|
||||
name='static',
|
||||
)
|
Loading…
Add table
Reference in a new issue