fix(server): bind server to all interfaces for Docker compatibility

This commit is contained in:
2026-04-18 11:18:01 +05:30
parent 27b5b6f4ea
commit 00b6924cea
+4 -3
View File
@@ -277,14 +277,15 @@ export async function main() {
}); });
// Start the server // Start the server
console.log(`Ask262 MCP HTTP Server running on http://localhost:${PORT}`); console.log(`Ask262 MCP HTTP Server running on http://0.0.0.0:${PORT}`);
console.log(`MCP endpoint: POST http://localhost:${PORT}/mcp`); console.log(`MCP endpoint: POST http://0.0.0.0:${PORT}/mcp`);
console.log(`Health check: GET http://localhost:${PORT}/health`); console.log(`Health check: GET http://0.0.0.0:${PORT}/health`);
console.log(`Mode: Stateless JSON (non-streaming)`); console.log(`Mode: Stateless JSON (non-streaming)`);
serve({ serve({
fetch: app.fetch, fetch: app.fetch,
port: PORT, port: PORT,
hostname: "0.0.0.0", // Bind to all interfaces for container/Docker compatibility
}); });
} }