Small cleanup for easier local development.
Added a dev/ folder which will hold all the needed files for local development.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||
|
||||
$file = dirname(__DIR__) . '/public' . $uri;
|
||||
|
||||
if (is_file($file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
require dirname(__DIR__) . '/index.php';
|
||||
+1
-3
@@ -1,10 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${HOST:-127.0.0.1}"
|
||||
PORT="${PORT:-3333}"
|
||||
|
||||
echo "Starting development server..."
|
||||
echo "URL: http://${HOST}:${PORT}"
|
||||
|
||||
php -S "${HOST}:${PORT}" index.php
|
||||
php -S "${HOST}:${PORT}" -t public dev/server.php
|
||||
|
||||
Reference in New Issue
Block a user