Better support for PHP's built-in webserver

This commit is contained in:
Matthieu Napoli
2015-11-07 20:35:29 +01:00
parent bb942336de
commit 35d6c5f5fa
2 changed files with 5 additions and 1 deletions

View File

@@ -5,4 +5,4 @@ app:
volumes:
- .:/app
working_dir: /app
command: "php -S 0.0.0.0:8000 -t web"
command: "php -S 0.0.0.0:8000 -t web web/index.php"

View File

@@ -15,6 +15,10 @@ use function Stratify\Framework\pipe;
use function Stratify\Framework\router;
use function Stratify\Router\route;
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . preg_replace('#(\?.*)$#', '', $_SERVER['REQUEST_URI']))) {
return false;
}
require __DIR__ . '/../vendor/autoload.php';
$modules = [