Fix Next 15 server startup ordering

This commit is contained in:
Codex
2026-04-27 16:05:11 +00:00
parent a5ab13f578
commit 5f1331a85e
+3 -3
View File
@@ -385,12 +385,12 @@ async function startLocalTerminalServerIfNeeded() {
const app = next({ dev, hostname, port }) const app = next({ dev, hostname, port })
const handle = app.getRequestHandler() const handle = app.getRequestHandler()
const handleUpgrade = typeof app.getUpgradeHandler === 'function'
? app.getUpgradeHandler()
: null
await startLocalTerminalServerIfNeeded() await startLocalTerminalServerIfNeeded()
await app.prepare() await app.prepare()
const handleUpgrade = typeof app.getUpgradeHandler === 'function'
? app.getUpgradeHandler()
: null
const server = http.createServer((req, res) => handle(req, res)) const server = http.createServer((req, res) => handle(req, res))
const dashboardWsProxyServer = http.createServer((_, res) => { const dashboardWsProxyServer = http.createServer((_, res) => {