add htaccess files and index.php with slim instantiation
This commit is contained in:
parent
da1b81663d
commit
22fb98a5b1
3 changed files with 23 additions and 0 deletions
4
public/.htaccess
Normal file
4
public/.htaccess
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^ index.php [QSA,L]
|
||||
16
public/index.php
Normal file
16
public/index.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\RequestInterface as Request;
|
||||
use Slim\Factory\AppFactory;
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
$app = AppFactory::create();
|
||||
|
||||
$app->get('/', function (Request $request, Response $response, $args) {
|
||||
$response->getBody()->write("Hello world!");
|
||||
return $response;
|
||||
});
|
||||
|
||||
$app->run();
|
||||
Loading…
Add table
Add a link
Reference in a new issue