forked from clencyc/LiveEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·56 lines (46 loc) · 1.24 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·56 lines (46 loc) · 1.24 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# LiveEdit Backend & Frontend Setup Script
echo "=== LiveEdit Full Stack Setup ==="
echo ""
# Check if we're in the right directory
if [ ! -d "LiveEditBackend" ] || [ ! -d "LiveEditFronten" ]; then
echo "Error: Please run this script from the LiveEditProject root directory"
exit 1
fi
echo "Step 1: Setting up Backend (Python)"
cd LiveEditBackend
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating Python virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Install dependencies
echo "Installing backend dependencies..."
pip install -r requirements.txt
echo ""
echo "Step 2: Setting up Frontend (Node.js)"
cd ../LiveEditFronten
# Install Node dependencies
if [ ! -d "node_modules" ]; then
echo "Installing frontend dependencies..."
npm install
fi
echo ""
echo "=== Setup Complete ==="
echo ""
echo "To run the application:"
echo ""
echo "Terminal 1 - Backend:"
echo " cd LiveEditBackend"
echo " source venv/bin/activate"
echo " python app.py"
echo ""
echo "Terminal 2 - Frontend:"
echo " cd LiveEditFronten"
echo " npm run dev"
echo ""
echo "Then open: http://localhost:5173"
echo ""