-
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.25 KB
/
setup.sh
File metadata and controls
executable file
Β·56 lines (46 loc) Β· 1.25 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
set -e
echo "π Starting GitHub Starred Repositories Application"
echo ""
echo "π Prerequisites:"
echo " - Go 1.21 or later"
echo " - Node.js 18 or later"
echo " - GitHub Personal Access Token (optional, for higher rate limits)"
echo ""
echo "π§ Setting up environment..."
if [ ! -f ".env" ]; then
echo "Creating .env file..."
cat > .env << EOL
GITHUB_TOKEN=your_github_token_here
NEXT_PUBLIC_API_URL=http://localhost:8090
EOL
echo "Please edit .env file with your GitHub token"
fi
echo ""
echo "π¦ Installing dependencies..."
if [ ! -d "backend/pb_data" ]; then
echo "Creating PocketBase data directory..."
mkdir -p backend/pb_data
fi
cd backend
if [ ! -f "go.sum" ]; then
echo "Downloading Go dependencies..."
go mod download
fi
cd ..
cd frontend
if [ ! -d "node_modules" ]; then
echo "Installing npm dependencies..."
npm install
fi
cd ..
echo ""
echo "β
Setup completed!"
echo ""
echo "π To start the application:"
echo " 1. Backend: cd backend && ./github-collector serve"
echo " 2. Frontend: cd frontend && npm run dev"
echo ""
echo "π API Documentation: See API.md"
echo "π Frontend will be available at: http://localhost:3000"
echo "π§ Backend API will be available at: http://localhost:8090"