reisraff / phulp-server
The server addon for phulp
1.0.0
2016-10-27 17:35 UTC
Requires
- php: >=5.6
- react/child-process: ~0.4
- reisraff/phulp: ~1.7
This package is auto-updated.
Last update: 2024-10-28 03:43:01 UTC
README
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() ); });