forked from FWS/FWS-TEMPLATE-Website-OnePage
Running the site locally required Apache and reading the .htaccess. Add a php -S router that reproduces that routing (clean URLs, site 404) so pages behave the same locally as in production, plus serve scripts and docs.
13 lines
361 B
Bash
Executable File
13 lines
361 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Serveur de développement local (aucun Apache/WAMP requis).
|
|
# Usage : bash tools/serve.sh (ou HOST=0.0.0.0 PORT=8080 bash tools/serve.sh)
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
HOST="${HOST:-127.0.0.1}"
|
|
PORT="${PORT:-8080}"
|
|
|
|
echo "FWS Linux — serveur local : http://${HOST}:${PORT}"
|
|
exec php -S "${HOST}:${PORT}" tools/router.php
|