This commit is contained in:
seb
2026-10-13 17:49:36 +02:00
parent c3d4fa5cd9
commit b7b5d554d8
9 changed files with 39 additions and 34 deletions

View File

@@ -17,7 +17,7 @@ import { shutdownJavascriptSandboxWorkers } from '../services/javascriptSandbox.
import { getOrCreateCert } from '../util/cert.js';
import { createLogger } from '../util/logger.js';
import v1Router from '../v1/index.js';
import { startSqlStudio, stopSqlStudio, isDevMode } from '../sqlstudio/server.js';
import { startBackendMonitor, stopBackendMonitor, isDevMode } from '../backendmonitor/server.js';
const apiLog = createLogger('api');
@@ -239,9 +239,9 @@ export async function startApi() {
if (isDevMode()) {
try {
await startSqlStudio();
await startBackendMonitor();
} catch (err) {
apiLog.error('Failed to start SQL Studio:', err.message);
apiLog.error('Failed to start Backend Monitor Interface:', err.message);
}
}
@@ -256,7 +256,7 @@ export async function startApi() {
}
export async function stopApi() {
await stopSqlStudio();
await stopBackendMonitor();
if (!server && !httpsServer) return;
// Long-lived SSE (and keep-alive) sockets otherwise block server.close()
// forever — node --watch hangs on "Waiting for graceful termination...".