18 lines
388 B
Python
18 lines
388 B
Python
from fastapi import FastAPI
|
|
from strawberry.fastapi import GraphQLRouter
|
|
|
|
from api.schema import schema
|
|
from api.seed import seed
|
|
from routers.frontend import SPAStaticFiles
|
|
|
|
seed()
|
|
|
|
graphql_app = GraphQLRouter(
|
|
schema=schema,
|
|
)
|
|
|
|
app = FastAPI()
|
|
|
|
app.include_router(graphql_app, prefix="/graphql")
|
|
app.mount("/", SPAStaticFiles(directory="frontend/dist", html=True), name="frontend")
|