6. Commands - swooletw/laravel-swoole GitHub Wiki
The swoole_http_server can only run in cli environment, and this package provides convenient artisan commands to manage it. By default, you can visit your site at http://127.0.0.1:1215
php artisan swoole:http {start|stop|restart|reload|infos}
Command | Description |
---|---|
start |
Start Laravel Swoole, list the processes by ps aux|grep swoole |
stop |
Stop Laravel Swoole |
restart |
Restart Laravel Swoole |
reload |
Reload all worker process(Contain your business & Laravel/Lumen codes), excluding master/manger process |
infos |
Show PHP and Swoole basic miscs infos(including PHP version, Swoole version, Laravel version, server status and PID) |
Now, you can run the following command to start the Swoole HTTP server.
$ php artisan swoole:http start
You can show your basic infos by running
$ php artisan swoole:http infos
+-----------------+-------------------------------------------------------------+
| Name | Value |
+-----------------+-------------------------------------------------------------+
| PHP Version | 7.1.14 |
| Swoole Version | 2.1.1-alpha |
| Laravel Version | 5.6.17 |
| Server Status | Online |
| Listen IP | 127.0.0.1 |
| Listen Port | 1215 |
| Websocket Mode | On |
| PID | 3956 |
| Log Path | /Users/Albert/Projects/laravel/storage/logs/swoole_http.log |
+-----------------+-------------------------------------------------------------+