34 lines
881 B
Python
Executable File
34 lines
881 B
Python
Executable File
from app.authentication.webapi.bootstrap.application import create_app
|
|
from app.authentication.webapi.config.site_settings import site_settings
|
|
from fastapi.responses import RedirectResponse
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
import uvicorn
|
|
from typing import Any
|
|
|
|
|
|
app = create_app()
|
|
|
|
|
|
@app.get("/", status_code=301)
|
|
async def root():
|
|
"""
|
|
TODO: redirect client to /doc#
|
|
"""
|
|
return RedirectResponse("docs")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run(
|
|
app="main:app", host=site_settings.SERVER_HOST, port=site_settings.SERVER_PORT
|
|
)
|
|
|
|
|
|
def get_context() -> Any:
|
|
# Define your context function. This is where you can set up authentication, database connections, etc.
|
|
return {}
|
|
|
|
|
|
def get_root_value() -> Any:
|
|
# Define your root value function. This can be used to customize the root value for GraphQL operations.
|
|
return {}
|