-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·73 lines (62 loc) · 1.77 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·73 lines (62 loc) · 1.77 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
68
69
70
71
72
73
#!/bin/bash
# HnCC Website - React Migration Setup Script
# This script helps set up the migrated React application
echo "================================================"
echo "HnCC Website - React.js Setup"
echo "================================================"
echo ""
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed!"
echo "Please install Node.js (v14 or higher) from https://nodejs.org/"
exit 1
fi
echo "✅ Node.js is installed: $(node --version)"
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed!"
echo "Please install npm"
exit 1
fi
echo "✅ npm is installed: $(npm --version)"
echo ""
# Install dependencies
echo "📦 Installing dependencies..."
echo "This may take a few minutes..."
echo ""
npm install
if [ $? -eq 0 ]; then
echo ""
echo "✅ Dependencies installed successfully!"
else
echo ""
echo "❌ Failed to install dependencies"
exit 1
fi
# Check if .env file exists
if [ ! -f .env ]; then
echo ""
echo "⚠️ .env file not found!"
echo "Creating .env from .env.example..."
cp .env.example .env
echo "✅ .env file created!"
echo ""
echo "⚠️ IMPORTANT: Please edit .env and add your EmailJS credentials:"
echo " - REACT_APP_SERVICE_ID"
echo " - REACT_APP_TEMPLATE_ID"
echo " - REACT_APP_USER_ID"
echo ""
fi
echo ""
echo "================================================"
echo "✅ Setup Complete!"
echo "================================================"
echo ""
echo "To start the development server, run:"
echo " npm start"
echo ""
echo "To build for production, run:"
echo " npm run build"
echo ""
echo "For more information, see README.md or MIGRATION.md"
echo ""