Add development and production scripts for PVideoDl. Introduced dev.bat, dev.sh for development mode with backend and Vite server, and run.bat, run.sh for production launch with dependency installation and frontend build. Enhanced user experience with clear instructions and error handling.

This commit is contained in:
Leonid Pershin
2026-06-19 16:27:14 +03:00
parent 3281fa2a5d
commit 303de2b26c
4 changed files with 77 additions and 0 deletions
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Дев-режим: бэкенд (:8000) + Vite dev-сервер (:5173) с hot-reload фронта.
# Откройте http://localhost:5173 — Vite проксирует /api на бэкенд.
set -euo pipefail
cd "$(dirname "$0")"
uv sync
[ -d frontend/node_modules ] || (cd frontend && npm install)
echo "==> Бэкенд → http://127.0.0.1:8000 (в фоне)"
uv run python -m app.main &
backend_pid=$!
trap 'kill "$backend_pid" 2>/dev/null' EXIT INT TERM
echo "==> Vite dev → http://localhost:5173"
cd frontend
npm run dev