Files
PVideoDl/dev.sh
T

18 lines
558 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/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