Skip to content

antidot-framework/installer

Antidot Framework Installer

Scrutinizer Code Quality Code Coverage Build Status Code Intelligence Status Maintainability

Antidot Framework skeleton installer. This package let you choosing between different types of Antidot framework project skeletons:

  • Classic Web App
  • Serverless App
  • Console Line Tool
  • Micro Http App
  • React Http App

Requirements

  • PHP >= 7.4.0 for current
  • Composer

Micro HTTP App

Lightweight PSR-15 middleware application.

Dependencies

Routing

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');
...

File structure

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        

Docker environment

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages