File size: 869 Bytes
a0fcd39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

# Run Jam Track Studio locally

# Check if we're in the project root
if [ ! -f "backend/main.py" ]; then
    echo "Error: Please run this script from the project root directory"
    exit 1
fi

# Install backend dependencies if needed
if [ ! -d "backend/.venv" ]; then
    echo "Installing backend dependencies..."
    cd backend
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    cd ..
else
    source backend/.venv/bin/activate
fi

# Install frontend dependencies if needed
if [ ! -d "frontend/node_modules" ]; then
    echo "Installing frontend dependencies..."
    cd frontend
    npm install
    cd ..
fi

# Build frontend
echo "Building frontend..."
cd frontend
npm run build
cd ..

# Run backend
echo "Starting server on http://localhost:7860"
python -m uvicorn backend.main:app --host 0.0.0.0 --port 7860