PHP code example of ensi / octane-swoole-urgent-starter
1. Go to this page and download the library: Download ensi/octane-swoole-urgent-starter 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/ */
ensi / octane-swoole-urgent-starter example snippets
'swoole' => [
'command' => '/var/www/vendor/bin/urgent-swoole-server',
'show_fatal_error' => env('OCTANE_SHOW_FATAL_ERROR', false),
]
shell
php artisan octane:dump-server-state --host=0.0.0.0 --port=8000 --workers=20
export APP_ENV=production
export APP_BASE_PATH=/var/www
export LARAVEL_OCTANE=1
php ./vendor/bin/swoole-server /var/www/storage/logs/octane-server-state.json
shell
OCTANE_SHOW_FATAL_ERROR=true php artisan octane:swoole --watch --host=0.0.0.0 --workers=1 --task-workers=1 || sleep 3600