diff --git a/anime/__main__.py b/anime/__main__.py
index 44db6fe..c86f2e5 100644
--- a/anime/__main__.py
+++ b/anime/__main__.py
@@ -14,7 +14,7 @@ cli = Typer()
@cli.command()
def run_app(
- host: str = "::",
+ host: str = "0.0.0.0",
port: int = 8000,
anime_dir: Optional[Path] = Argument(None, help="Directory where anime is stored."),
):
@@ -35,7 +35,7 @@ def run_app(
)
app.state.anime_dir = anime_dir
- uvicorn.run(app, host=host, port=port)
+ uvicorn.run(app, host=host, port=port, workers=1)
def main():
diff --git a/pre_build.py b/build.py
similarity index 94%
rename from pre_build.py
rename to build.py
index 68c0a96..ff330ed 100644
--- a/pre_build.py
+++ b/build.py
@@ -2,6 +2,7 @@ import os
from pathlib import Path
from shutil import copytree, rmtree
+
CURRENT_DIR = Path(__file__).parent
STATIC_OUTPUT_DIR = CURRENT_DIR / "anime/static"
FRONTEND_DIR = CURRENT_DIR / "frontend"
@@ -21,7 +22,7 @@ class DirChanger:
os.chdir(CURRENT_DIR)
-def build():
+def build(setup_kwargs):
"""
Build frontend and copy it to the static directory.
@@ -38,6 +39,8 @@ def build():
rmtree(STATIC_OUTPUT_DIR, ignore_errors=True)
copytree(symlinks=True, src=DIST_DIR, dst=STATIC_OUTPUT_DIR)
+ return setup_kwargs
+
if __name__ == "__main__":
- build()
+ build({})
diff --git a/frontend/src/views/HomeView.vue b/frontend/src/views/HomeView.vue
index 6bad3d5..29008c6 100644
--- a/frontend/src/views/HomeView.vue
+++ b/frontend/src/views/HomeView.vue
@@ -24,7 +24,7 @@ async function startWatching() {
-
+
diff --git a/pyproject.toml b/pyproject.toml
index 3d41ff4..9406048 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,6 +4,7 @@ version = "0.1.0"
description = ""
authors = ["Pavel Kirilin "]
readme = "README.md"
+include = ["anime/static/**/*"]
[tool.poetry.dependencies]
python = "^3.11"
@@ -16,7 +17,7 @@ anime = "anime.__main__:main"
[tool.poetry.build]
generate-setup-file = false
-script = "pre_build.py"
+script = "build.py"
[build-system]
requires = ["poetry-core"]