SkillAgentSearch skills...

Empress

Empress is a flexible microframework for creating async web applications in PHP 8.1.

Install / Use

/learn @empress-php/Empress
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Build Latest Stable Version Coverage Status License: MIT

Work in progress ⚡

Empress is a flexible PHP 8.1 microframework for creating async web applications. It's based on amphp/http-server. The name is a portmanteau of Express and Amp as Empress's simplicity was first inspired by Express.js. Later, many useful ideas were incorporated from Spark and Javalin. Ultimately it's also the name of one of the cards from major arcana, part of the tarot deck.

Documentation

Read the Wiki for more information and make sure to check out the Getting Started tutorial.

Taste it

<?php
// app.php

use Empress\Application;
use Empress\Context;
use Empress\Routing\RouteCollector\AnnotatedRouteCollectorTrait;
use Empress\Routing\RouteCollector\Attribute\Group;
use Empress\Routing\RouteCollector\Attribute\Route;

#[Group('/hello')]
class IndexController
{
    use AnnotatedRouteCollectorTrait;

    #[Route('GET', '/')]
    public function index(Context $ctx)
    {
        $ctx->response('<h1>Hello!</h1>');
    }
}

$app = Application::create(9010);
$app->routes(new IndexController());

return $app;

// Run it:
// vendor/bin/empress app.php
View on GitHub
GitHub Stars15
CategoryDevelopment
Updated2y ago
Forks0

Languages

PHP

Security Score

75/100

Audited on Nov 10, 2023

No findings