fmt+debug
All checks were successful
Deploy on push / deploy (push) Successful in 5s

This commit is contained in:
2024-12-12 01:04:11 +03:00
parent 87506b0478
commit d02ae5bd3f
8 changed files with 32 additions and 5 deletions

10
main.py
View File

@@ -1,11 +1,13 @@
import asyncio
import os
import sys
from importlib import import_module
from os.path import exists
from ariadne import load_schema_from_path, make_executable_schema
from ariadne.asgi import GraphQL
from starlette.applications import Starlette
from starlette.middleware.cors import CORSMiddleware
from starlette.requests import Request
from starlette.responses import JSONResponse, Response
from starlette.routing import Route
@@ -123,3 +125,11 @@ app = Starlette(
)
app.add_middleware(ExceptionHandlerMiddleware)
if "dev" in sys.argv:
app.add_middleware(
CORSMiddleware,
allow_origins=["https://localhost:3000"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)