generated from github/codespaces-blank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
Β·59 lines (45 loc) Β· 1.4 KB
/
start.sh
File metadata and controls
executable file
Β·59 lines (45 loc) Β· 1.4 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
57
58
59
#!/bin/bash
# FileFlow - Quick Start Script
echo "π Starting FileFlow..."
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "β Python 3 is not installed. Please install Python 3.12 or higher."
exit 1
fi
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "β Node.js is not installed. Please install Node.js 18 or higher."
exit 1
fi
echo "β
Prerequisites check passed"
# Get the directory where the script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Install backend dependencies
echo "π¦ Installing backend dependencies..."
cd "$SCRIPT_DIR/FileFlow/backend"
pip install -r ../requirements.txt
# Initialize database
echo "ποΈ Initializing database..."
export FLASK_APP=app.py
flask init-db
# Start backend server in background
echo "π Starting backend server..."
flask run &
BACKEND_PID=$!
# Install frontend dependencies
echo "π¦ Installing frontend dependencies..."
cd "$SCRIPT_DIR/FileFlow/frontend"
npm install
# Start frontend development server
echo "βοΈ Starting frontend server..."
npm start &
FRONTEND_PID=$!
echo "β
FileFlow is running!"
echo "π Backend: http://localhost:5000"
echo "π Frontend: http://localhost:3000"
echo ""
echo "Press Ctrl+C to stop all servers"
# Trap Ctrl+C and kill both processes
trap "kill $BACKEND_PID $FRONTEND_PID; exit" INT
# Wait for processes
wait