chore: обновление Poetry до актуальной версии (2.1.3) и правка структуры проекта.
Some checks failed
Lint project / lint (push) Has been cancelled

This commit is contained in:
2025-07-18 16:54:59 +04:00
parent 78cc7e3f54
commit ae14c51b0e
28 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,9 @@ dependencies = [
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
packages = [{include = "lkeep", from = "src"}]
[project.scripts]
app = "lkeep.main:start"

View File

@ -128,6 +128,7 @@ class Settings(BaseSettings):
templates_dir: str = "templates"
frontend_url: str
access_token_expire: int
domain: str
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf8", extra="ignore")

View File

View File

@ -8,6 +8,7 @@ https://pressanybutton.ru/category/servis-na-fastapi/
import uvicorn
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from lkeep.apps import apps_router
@ -15,6 +16,14 @@ app = FastAPI()
app.include_router(router=apps_router)
app.add_middleware(
CORSMiddleware,
allow_origins=["http://127.0.0.1:3000"], # TODO: ЗАМЕНИТЬ ПОТОМ НА ДОМЕН
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
def start():
uvicorn.run(app="lkeep.main:app", reload=True)