Compare commits
3 Commits
448228e3ad
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c52bc9b737 | |||
| 5b2864c7d8 | |||
| f9652ffed7 |
@@ -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,10 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
HOST="${HOST:-127.0.0.1}"
|
HOST="${HOST:-127.0.0.1}"
|
||||||
PORT="${PORT:-3333}"
|
PORT="${PORT:-3333}"
|
||||||
|
|
||||||
echo "Starting development server..."
|
echo "Starting development server..."
|
||||||
echo "URL: http://${HOST}:${PORT}"
|
echo "URL: http://${HOST}:${PORT}"
|
||||||
|
|
||||||
php -S "${HOST}:${PORT}" index.php
|
php -S "${HOST}:${PORT}" -t public dev/server.php
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
<script src="/public/js/app.js"></script>
|
<script src="/js/app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<title><?php echo escape_string($title ?? 'miniPHP') ?></title>
|
<title><?php echo escape_string($title ?? 'miniPHP') ?></title>
|
||||||
<link rel="stylesheet" href="/public/css/app.css">
|
<link rel="stylesheet" href="/css/app.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user