19 lines
326 B
Python
19 lines
326 B
Python
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',
|
|
)
|