-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-frontend.sh
More file actions
executable file
·54 lines (46 loc) · 1.31 KB
/
start-frontend.sh
File metadata and controls
executable file
·54 lines (46 loc) · 1.31 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
#!/bin/bash
# Bitcoin Script Learning Lab - Frontend Startup Script
echo "🚀 Starting Bitcoin Script Learning Lab Frontend..."
echo ""
# Check if Node.js is available
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed or not in PATH"
echo "Please install Node.js first: https://nodejs.org/"
exit 1
fi
# Check if we're in the right directory
if [ ! -f "frontend/server.js" ]; then
echo "❌ Please run this script from the btc-script-lab root directory"
exit 1
fi
# Start the frontend server
echo "📁 Starting frontend server..."
cd frontend
# Check if package.json exists, if not create it
if [ ! -f "package.json" ]; then
echo "📦 Creating package.json..."
cat > package.json << EOF
{
"name": "bitcoin-script-lab-frontend",
"version": "1.0.0",
"description": "Frontend for Bitcoin Script Learning Lab",
"main": "server.js",
"scripts": {
"start": "node server.js",
"dev": "node server.js"
},
"keywords": ["bitcoin", "script", "frontend", "learning", "education"],
"author": "Bitcoin Script Lab",
"license": "MIT",
"engines": {
"node": ">=14.0.0"
}
}
EOF
fi
echo "🌐 Frontend server starting..."
echo "📚 Open your browser to: http://localhost:3000"
echo "🛑 Press Ctrl+C to stop the server"
echo ""
# Start the server
node server.js