run the app from public index file
This commit is contained in:
parent
37ff440c16
commit
c2ad749b84
3 changed files with 34 additions and 0 deletions
18
bootstrap/app.php
Normal file
18
bootstrap/app.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use DI\Bridge\Slim\Bridge;
|
||||
|
||||
$container = require __DIR__.'/container.php';
|
||||
$app = Bridge::create($container);
|
||||
|
||||
// change first param to false for production
|
||||
$app->addErrorMiddleware(true, true, true);
|
||||
|
||||
$app->get('/', function (Response $response) {
|
||||
$response->getBody()->write("Hello world!");
|
||||
return $response;
|
||||
});
|
||||
|
||||
return $app;
|
||||
Loading…
Add table
Add a link
Reference in a new issue