Commit ·
1313e60
1
Parent(s): bf93464
update
Browse files
backend/src/index.ts
CHANGED
|
@@ -9,23 +9,23 @@ const PORT = process.env.PORT || 8080;
|
|
| 9 |
app.use(cors());
|
| 10 |
|
| 11 |
// IMPORTANT: Proxy must come BEFORE express.json() for the MCP agents
|
| 12 |
-
app.use('/mcp/analyzer', createProxyMiddleware({
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
}));
|
| 17 |
-
app.use('/mcp/reader', createProxyMiddleware({
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
}));
|
| 22 |
-
app.use('/mcp/generator', createProxyMiddleware({
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
}));
|
| 27 |
|
| 28 |
-
app.use(express.json());
|
| 29 |
|
| 30 |
app.get('/api/health', (req, res) => {
|
| 31 |
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
|
|
|
| 9 |
app.use(cors());
|
| 10 |
|
| 11 |
// IMPORTANT: Proxy must come BEFORE express.json() for the MCP agents
|
| 12 |
+
app.use('/mcp/analyzer', createProxyMiddleware({
|
| 13 |
+
target: 'http://localhost:3002',
|
| 14 |
+
pathRewrite: { '^/mcp/analyzer': '' },
|
| 15 |
+
changeOrigin: true
|
| 16 |
}));
|
| 17 |
+
app.use('/mcp/reader', createProxyMiddleware({
|
| 18 |
+
target: 'http://localhost:3003',
|
| 19 |
+
pathRewrite: { '^/mcp/reader': '' },
|
| 20 |
+
changeOrigin: true
|
| 21 |
}));
|
| 22 |
+
app.use('/mcp/generator', createProxyMiddleware({
|
| 23 |
+
target: 'http://localhost:3004',
|
| 24 |
+
pathRewrite: { '^/mcp/generator': '' },
|
| 25 |
+
changeOrigin: true
|
| 26 |
}));
|
| 27 |
|
| 28 |
+
app.use(express.json({ limit: '50mb' }));
|
| 29 |
|
| 30 |
app.get('/api/health', (req, res) => {
|
| 31 |
res.json({ status: 'ok', timestamp: new Date().toISOString() });
|
mcp-servers/code-reader/src/index.mts
CHANGED
|
@@ -190,7 +190,7 @@ function createServer() {
|
|
| 190 |
if (process.env.PORT) {
|
| 191 |
const app = express();
|
| 192 |
app.use(cors());
|
| 193 |
-
app.use(express.json());
|
| 194 |
|
| 195 |
const transports: Record<string, StreamableHTTPServerTransport | SSEServerTransport> = {};
|
| 196 |
|
|
|
|
| 190 |
if (process.env.PORT) {
|
| 191 |
const app = express();
|
| 192 |
app.use(cors());
|
| 193 |
+
app.use(express.json({ limit: '50mb' }));
|
| 194 |
|
| 195 |
const transports: Record<string, StreamableHTTPServerTransport | SSEServerTransport> = {};
|
| 196 |
|
mcp-servers/doc-generator/src/index.mts
CHANGED
|
@@ -168,7 +168,7 @@ function createServer() {
|
|
| 168 |
if (process.env.PORT) {
|
| 169 |
const app = express();
|
| 170 |
app.use(cors());
|
| 171 |
-
app.use(express.json());
|
| 172 |
|
| 173 |
const transports: Record<string, StreamableHTTPServerTransport | SSEServerTransport> = {};
|
| 174 |
|
|
|
|
| 168 |
if (process.env.PORT) {
|
| 169 |
const app = express();
|
| 170 |
app.use(cors());
|
| 171 |
+
app.use(express.json({ limit: '50mb' }));
|
| 172 |
|
| 173 |
const transports: Record<string, StreamableHTTPServerTransport | SSEServerTransport> = {};
|
| 174 |
|
mcp-servers/repo-analyzer/src/index.mts
CHANGED
|
@@ -251,7 +251,7 @@ function createServer() {
|
|
| 251 |
if (process.env.PORT) {
|
| 252 |
const app = express();
|
| 253 |
app.use(cors());
|
| 254 |
-
app.use(express.json());
|
| 255 |
|
| 256 |
const transports: Record<string, StreamableHTTPServerTransport | SSEServerTransport> = {};
|
| 257 |
|
|
|
|
| 251 |
if (process.env.PORT) {
|
| 252 |
const app = express();
|
| 253 |
app.use(cors());
|
| 254 |
+
app.use(express.json({ limit: '50mb' }));
|
| 255 |
|
| 256 |
const transports: Record<string, StreamableHTTPServerTransport | SSEServerTransport> = {};
|
| 257 |
|