背景
Nuxt から API を叩いた際に、504エラーが発生しました。
環境
- Nuxt(localhost:3000)
- Spring Boot(localhost:8080)
- Windows(PowerShell)
症状
- フロントで 504 Gateway Timeout
- Nuxt コンソールに以下のエラー
ECONNREFUSED原因
ポート8080が別プロセスに使用されており、Spring Bootが起動できていなかった
確認方法
curl http://localhost:8080⇒ 接続できなければ、APIは起動していない可能性が高い
解決手順
① ポート使用状況を確認
netstat -ano | findstr :8080