Fix SSE endpoint and improve server deployment

- Enhanced SSE endpoint with better error handling and logging
- Added comprehensive API info endpoint
- Improved server startup logging with all endpoints
- Updated Dockerfile to use SSE transport by default
- Added debug script for SSE connection troubleshooting
- Server now binds to 0.0.0.0 for better container compatibility
This commit is contained in:
Morax
2025-07-29 14:31:57 +08:00
parent 7354e41d19
commit 1ab822e58d
4 changed files with 115 additions and 10 deletions

View File

@@ -31,5 +31,5 @@ EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"
# Default command - run HTTP server
CMD ["node", "dist/index.js", "--transport", "http", "--port", "3000"]
# Default command - run HTTP server with SSE support
CMD ["node", "dist/index.js", "--transport", "sse", "--port", "3000"]