From 58c8eecf88ec121fc2a640cf4e92c6bbfba4e8d9 Mon Sep 17 00:00:00 2001 From: ykxiao Date: Sat, 12 Jul 2025 13:57:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=8D=E5=8A=A1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/autoload/server.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/autoload/server.php b/config/autoload/server.php index 7a4de17..34929eb 100644 --- a/config/autoload/server.php +++ b/config/autoload/server.php @@ -14,6 +14,7 @@ use Hyperf\HttpServer\Server; use Hyperf\Server\Event; use Hyperf\Server\ServerInterface; use Swoole\Constant; +use function Hyperf\Support\env; return [ 'mode' => SWOOLE_PROCESS, @@ -22,7 +23,7 @@ return [ 'name' => 'http', 'type' => ServerInterface::SERVER_HTTP, 'host' => '0.0.0.0', - 'port' => 9501, + 'port' => intval(env('HTTP_PORT', 9501)), 'sock_type' => SWOOLE_SOCK_TCP, 'callbacks' => [ Event::ON_REQUEST => [Server::class, 'onRequest'],