src/Neutrino/Foundation/Cli/Tasks/ServerTask.php
private function run($host, $port)
    {
        $cmd = PHP_BINARY . ' -S ' . $host . ':' . $port . ' app_dev.php';
        $cwd = BASE_PATH . '/public';

        $this->proc = $this->getDI()->get(Process::class, [$cmd, $cwd]);

        $this->proc->start();

        $this->block(['[OK] http://' . $host . ':' . $port], 'info');

        $this->proc->watch(function ($stdo, $stde) {
            !empty($stdo) && $this->line(trim($stdo, "\n\r"));
            !empty($stde) && $this->error(trim($stde, "\n\r"));
        });

        $this->block(['[ERR] server suddenly stopped'], 'error');

        $this->proc->close();
    }
private function run($host, $port)
    {
        $cmd = PHP_BINARY . ' -S ' . $host . ':' . $port . ' app_dev.php';
        $cwd = BASE_PATH . '/public';

        $this->proc = $this->getDI()->get(Process::class, [$cmd, $cwd]);

        $this->proc->start();

        $this->block(['[OK] http://' . $host . ':' . $port], 'info');

        $this->proc->watch(function ($stdo, $stde) {
            !empty($stdo) && $this->line(trim($stdo, "\n\r"));
            !empty($stde) && $this->error(trim($stde, "\n\r"));
        });

        $this->block(['[ERR] server suddenly stopped'], 'error');

        $this->proc->close();
    }
@param $host
@param $port

@throws Exception