Skip to content

Commit 78e92a2

Browse files
committed
express app to use JSON body parsing middleware
1 parent f59b51d commit 78e92a2

File tree

2 files changed

+3
-1
lines changed
  • dev-packages/e2e-tests/test-applications/node-express/src

2 files changed

+3
-1
lines changed

dev-packages/e2e-tests/test-applications/node-express/src/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ import { mcpRouter } from './mcp';
2525
const app = express();
2626
const port = 3030;
2727

28+
app.use(express.json());
29+
2830
app.use(mcpRouter);
2931

3032
app.get('/crash-in-with-monitor/:id', async (req, res) => {

dev-packages/e2e-tests/test-applications/node-express/src/mcp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ mcpRouter.get('/sse', async (_, res) => {
5151
await server.connect(transport);
5252
});
5353

54-
mcpRouter.post('/messages', express.json(), async (req, res) => {
54+
mcpRouter.post('/messages', async (req, res) => {
5555
const sessionId = req.query.sessionId;
5656
const transport = transports[sessionId as string];
5757
if (transport) {

0 commit comments

Comments
 (0)