mirror of
https://github.com/flibusta-apps/services_manager_server.git
synced 2025-12-06 12:35:39 +01:00
Use uvicorn
This commit is contained in:
@@ -4,6 +4,7 @@ from app.depends import check_token
|
||||
from app.models import CachePrivileges, Service, Statuses
|
||||
from app.serializers import ServiceCreate, ServiceDetail
|
||||
|
||||
|
||||
# TODO: add redis cache
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
import sentry_sdk
|
||||
|
||||
from app.views import router
|
||||
from core.config import env_config
|
||||
from core.db import database
|
||||
|
||||
|
||||
sentry_sdk.init(
|
||||
env_config.SENTRY_DSN,
|
||||
)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from fastapi.security import APIKeyHeader
|
||||
|
||||
|
||||
default_security = APIKeyHeader(name="Authorization")
|
||||
|
||||
@@ -5,6 +5,7 @@ from sqlalchemy import MetaData
|
||||
|
||||
from core.config import env_config
|
||||
|
||||
|
||||
DATABASE_URL = (
|
||||
f"postgresql://{env_config.POSTGRES_USER}:{quote(env_config.POSTGRES_PASSWORD)}@"
|
||||
f"{env_config.POSTGRES_HOST}:{env_config.POSTGRES_PORT}/{env_config.POSTGRES_DB}"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from core.app import start_app
|
||||
|
||||
|
||||
app = start_app()
|
||||
|
||||
Reference in New Issue
Block a user