PHP code example of zendframework / zend-expressive-swoole

1. Go to this page and download the library: Download zendframework/zend-expressive-swoole library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zendframework / zend-expressive-swoole example snippets




use Zend\Expressive\Swoole\ConfigProvider;

return array_merge((new ConfigProvider())(), []);



use Zend\Expressive\Swoole\ConfigProvider;

return array_merge((new ConfigProvider())(), [
    'zend-expressive-swoole' => [
        'swoole-http-server' => [
            'host' => 'insert hostname to use here',
            'port' => 80, // use an integer value here
        ],
    ],
]);