forked from prepguides/prepguides.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserve.sh
More file actions
executable file
·25 lines (22 loc) · 786 Bytes
/
serve.sh
File metadata and controls
executable file
·25 lines (22 loc) · 786 Bytes
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
#!/bin/bash
# Simple static file server for PrepGuides.dev
# No Node.js or npm required!
echo "🚀 Starting PrepGuides.dev static server..."
echo "📁 Serving files from: $(pwd)"
echo "🌐 Open your browser to: http://localhost:8000"
echo "⏹️ Press Ctrl+C to stop the server"
echo ""
# Try Python 3 first, then Python 2, then suggest alternatives
if command -v python3 &> /dev/null; then
echo "Using Python 3..."
python3 -m http.server 8000
elif command -v python &> /dev/null; then
echo "Using Python 2..."
python -m SimpleHTTPServer 8000
else
echo "❌ Python not found. Please install Python or use one of these alternatives:"
echo " - npx serve ."
echo " - php -S localhost:8000"
echo " - Any other static file server"
exit 1
fi