-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstart_server.sh
More file actions
executable file
·36 lines (30 loc) · 913 Bytes
/
Copy pathstart_server.sh
File metadata and controls
executable file
·36 lines (30 loc) · 913 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
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# start_server.sh - Lightweight development server launcher
# Default configuration
HOST="0.0.0.0"
PORT=8080
# Load from .env if available
if [ -f .env ]; then
ENV_PORT=$(grep "^APP_URL=" .env | cut -d ':' -f3 | cut -d '/' -f1)
if [ ! -z "$ENV_PORT" ]; then
PORT=$ENV_PORT
fi
fi
echo "================================================"
echo " Quantum Astrology - Development Server"
echo "================================================"
echo " Starting at: http://$HOST:$PORT"
echo " Press Ctrl+C to stop the server"
echo "================================================"
echo ""
# Check for PHP
if ! command -v php &> /dev/null; then
echo "Error: PHP is not installed or not in your PATH."
exit 1
fi
# Check for index.php
if [ ! -f index.php ]; then
echo "Error: index.php not found. Are you in the project root?"
exit 1
fi
php -S $HOST:$PORT index.php