Files
bttoxin-pipeline/scripts/start_web.sh
zly 963215de2d Fix(pipeline): prevent nested zip packaging and update CRISPR dependencies
- Add filter to skip .zip and .tar.gz files when creating result archive
- Update CRISPR feature with CASFinder dependencies (hmmer, blast, vmatch, etc.)
- Add install-casfinder task for macsydata installation
- Remove obsolete CRISPR test files

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 20:06:41 +08:00

45 lines
1.3 KiB
Bash

#!/bin/bash
# Start both frontend and backend servers
# Usage: ./scripts/start_web.sh [frontend_port] [backend_port]
FRONTEND_PORT=${1:-5173}
BACKEND_PORT=${2:-8000}
echo "=========================================="
echo "BtToxin Pipeline Web Services"
echo "=========================================="
echo "Frontend: http://localhost:${FRONTEND_PORT}"
echo "Backend: http://localhost:${BACKEND_PORT}"
echo "=========================================="
echo ""
echo "Starting services..."
# Create jobs directory if it doesn't exist
mkdir -p jobs
echo "Jobs directory: $(pwd)/jobs"
# Start backend in background
echo "[Backend] Starting FastAPI server on port ${BACKEND_PORT}..."
uvicorn web.backend.main:app --reload --host 0.0.0.0 --port ${BACKEND_PORT} &
BACKEND_PID=$!
# Wait for backend to be ready
sleep 2
# Start frontend
echo "[Frontend] Starting Vite dev server on port ${FRONTEND_PORT}..."
cd frontend && pnpm dev --host --port ${FRONTEND_PORT} &
FRONTEND_PID=$!
echo ""
echo "=========================================="
echo "Services started:"
echo " - Backend (PID: ${BACKEND_PID}) on port ${BACKEND_PORT}"
echo " - Frontend (PID: ${FRONTEND_PID}) on port ${FRONTEND_PORT}"
echo "=========================================="
echo "Press Ctrl+C to stop all services"
echo ""
# Wait for any process to exit
wait