Skip to content

gingteam/amphp-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

// worker.php
<?php

use App\Kernel;
use GingTeam\AmphpRuntime\Runtime;

require_once dirname(__DIR__).'/vendor/autoload.php';

$app = function (array $context) {
    return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};

$options = [
    'project_dir' => dirname(__DIR__, 1),
    'document_root' => __DIR__,
    'port' => 8000,
];

$runtime = new Runtime($options);

[$app, $args] = $runtime->getResolver($app)->resolve();

$app = $app(...$args);

$runtime->getRunner($app)->run();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages