Antidot Framework skeleton installer. This package let you choosing between different types of Antidot framework project skeletons:
Lightweight PSR-15 middleware application.
You can add your routes with it custom middlewares in public/index.php
file, take a look at the example:
<?php
// public/index.php
declare(strict_types=1);
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ResponseInterface;
...
// Application Routes
$app->get('/', [
static function(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface {
$request = $request->withAttribute('docs_url', 'https://antidotfw.io');
return $handler->handle($request);
},
static function(ServerRequestInterface $request): ResponseInterface {
return new JsonResponse([
'message' => 'Welcome to Antidot Framework Micro HTTP App.',
'docs' => $request->getAttribute('docs_url'),
]);
}
], 'homepage');
...
config/
config.php
container.php
framework.prod.php
public/
index.php
test/
var/
cache/
.gitignore
composer.json
phpcs.xml.dist
phpunit.xml.dist
README.md