mcp-server-kubernetes 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/sse.js +11 -3
- package/package.json +1 -1
package/dist/utils/sse.js
CHANGED
|
@@ -21,7 +21,15 @@ export function startSSEServer(server) {
|
|
|
21
21
|
.send("Not found. Must pass valid sessionId as query param.");
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
let port = 3000;
|
|
25
|
+
try {
|
|
26
|
+
port = parseInt(process.env.PORT || "3000", 10);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
console.error("Invalid PORT environment variable, using default port 3000.");
|
|
30
|
+
}
|
|
31
|
+
const host = process.env.HOST || "localhost";
|
|
32
|
+
app.listen(port, host, () => {
|
|
33
|
+
console.log(`mcp-kubernetes-server is listening on port ${port}\nUse the following url to connect to the server:\n\http://${host}:${port}/sse`);
|
|
34
|
+
});
|
|
27
35
|
}
|