增加局域网访问
This commit is contained in:
+3
-1
@@ -22,6 +22,8 @@ if (-not (Test-Path "logs")) {
|
||||
pm2 start ecosystem.config.cjs
|
||||
pm2 save 2>$null
|
||||
Write-Host ""
|
||||
Write-Host "已启动。访问: http://127.0.0.1:5200" -ForegroundColor Green
|
||||
$lan = (Get-NetIPAddress -AddressFamily IPv4 -ErrorAction SilentlyContinue | Where-Object { $_.IPAddress -notmatch '^127\.' -and $_.PrefixOrigin -ne 'WellKnown' } | Select-Object -First 1).IPAddress
|
||||
Write-Host "已启动。本机: http://127.0.0.1:5200" -ForegroundColor Green
|
||||
if ($lan) { Write-Host "局域网: http://${lan}:5200" -ForegroundColor Green }
|
||||
Write-Host "查看状态: pm2 status" -ForegroundColor Cyan
|
||||
Write-Host "查看日志: pm2 logs api-key-manager" -ForegroundColor Cyan
|
||||
|
||||
Reference in New Issue
Block a user