Skip to content

Instantly share code, notes, and snippets.

@apoca
Created September 1, 2016 16:57
Show Gist options
  • Save apoca/e9534b0efddd64e97d1f992ac77a18dc to your computer and use it in GitHub Desktop.
Save apoca/e9534b0efddd64e97d1f992ac77a18dc to your computer and use it in GitHub Desktop.
<?php
// Delegate static file requests back to the PHP built-in webserver
if (php_sapi_name() === 'cli-server'
&& is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))
) {
return false;
}
chdir(dirname(__DIR__));
require '../vendor/autoload.php';
/** @var \Interop\Container\ContainerInterface $container */
$container = require '../api.config/container.php';
/** @var \Zend\Expressive\Application $app */
$app = $container->get(\Zend\Expressive\Application::class);
$app->run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment