-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
67 lines (59 loc) · 1.8 KB
/
setup.sh
File metadata and controls
67 lines (59 loc) · 1.8 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
60
61
62
63
64
65
66
67
#!/bin/bash
# GitHub Manager Setup Script
# This script helps you set up the project for local development
echo "🚀 Setting up GitHub Manager..."
echo
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 20+ first."
echo " Download from: https://nodejs.org/"
exit 1
fi
# Check Node.js version
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "⚠️ Node.js version $NODE_VERSION detected. Node.js 18+ is recommended."
fi
echo "✅ Node.js $(node -v) detected"
# Install dependencies
echo "📦 Installing dependencies..."
if npm install; then
echo "✅ Dependencies installed successfully"
else
echo "❌ Failed to install dependencies"
exit 1
fi
# Create .env file if it doesn't exist
if [ ! -f .env ]; then
echo "⚙️ Creating .env file..."
cat > .env << EOF
# GitHub Personal Access Token
# Get yours from: https://github.com/settings/tokens
# Required scopes: public_repo, read:user
VITE_GITHUB_TOKEN=your_github_personal_access_token_here
EOF
echo "✅ Created .env file"
echo "📝 Please edit .env and add your GitHub Personal Access Token"
else
echo "✅ .env file already exists"
fi
echo
echo "🎉 Setup complete!"
echo
echo "Next steps:"
echo "1. Get a GitHub Personal Access Token:"
echo " → Go to https://github.com/settings/tokens"
echo " → Generate new token (classic)"
echo " → Select scopes: public_repo, read:user"
echo
echo "2. Edit .env file and add your token:"
echo " → VITE_GITHUB_TOKEN=your_token_here"
echo
echo "3. Start the development server:"
echo " → npm run dev"
echo
echo "4. Open your browser:"
echo " → http://localhost:5173"
echo
echo "📚 For deployment instructions, see DEPLOYMENT.md"
echo