GitHunt

Phulp Server

It's a third-party project that's wrapper for "php built-in server"

Usage

Install:
$ composer require --dev reisraff/phulp-server
Coding:
<?php

use Phulp\Server\Server;

$server = new Server([
    'address' => 'localhost',
    'port' => '8000',
    'router' => 'router.php',
    'path' => '/www/data',
]);

$server->fireRun();
Using with PHULP.
<?php

use Phulp\Server\Server;

$phulp->task('serve', function ($phulp) use ($config) {
    $server = new Server(
        [
            'address' => 'localhost',
            'port' => '8000',
            'router' => 'router.php',
            'path' => $config['project_path'],
        ],
        $phulp->getLoop()
    );
});

Credits

@reisraff

Languages

PHP100.0%

Contributors

MIT License
Created October 20, 2016
Updated January 27, 2021
reisraff/phulp-server | GitHunt