chore: обновление Poetry до актуальной версии (2.1.3) и правка структуры проекта.
Some checks failed
Lint project / lint (push) Has been cancelled
Some checks failed
Lint project / lint (push) Has been cancelled
This commit is contained in:
@ -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"
|
||||
|
||||
|
@ -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")
|
||||
|
0
src/lkeep/database/alembic/__init__.py
Normal file
0
src/lkeep/database/alembic/__init__.py
Normal file
0
src/lkeep/database/alembic/versions/__init__.py
Normal file
0
src/lkeep/database/alembic/versions/__init__.py
Normal 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)
|
Reference in New Issue
Block a user