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}

    CommandDescription
    startStart Laravel Swoole, list the processes by ps aux|grep swoole
    stopStop Laravel Swoole
    restartRestart Laravel Swoole
    reloadReload all worker process(Contain your business & Laravel/Lumen codes), excluding master/manger process
    infosShow 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.

    1. $ php artisan swoole:http start

    You can show your basic infos by running

    1. $ php artisan swoole:http infos
    1. +-----------------+-------------------------------------------------------------+
    2. | Name | Value |
    3. +-----------------+-------------------------------------------------------------+
    4. | PHP Version | 7.1.14 |
    5. | Swoole Version | 2.1.1-alpha |
    6. | Laravel Version | 5.6.17 |
    7. | Server Status | Online |
    8. | Listen IP | 127.0.0.1 |
    9. | Listen Port | 1215 |
    10. | Websocket Mode | On |
    11. | PID | 3956 |
    12. | Log Path | /Users/Albert/Projects/laravel/storage/logs/swoole_http.log |
    13. +-----------------+-------------------------------------------------------------+