deploy test server
This commit is contained in:
parent
70fe3830b5
commit
11d1a68674
@ -152,6 +152,8 @@ const handleSessionRequest = async (req: express.Request, res: express.Response)
|
|||||||
app.get('/mcp', handleSessionRequest);
|
app.get('/mcp', handleSessionRequest);
|
||||||
app.delete('/mcp', handleSessionRequest);
|
app.delete('/mcp', handleSessionRequest);
|
||||||
|
|
||||||
|
// Only start server when running locally (not on Vercel)
|
||||||
|
if (!process.env.VERCEL) {
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.log(`\n🚀 MCP UI Demo Server`);
|
console.log(`\n🚀 MCP UI Demo Server`);
|
||||||
console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
|
console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
|
||||||
@ -162,3 +164,7 @@ app.listen(port, () => {
|
|||||||
console.log(` • get_stock_price - Data-only, no UI`);
|
console.log(` • get_stock_price - Data-only, no UI`);
|
||||||
console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`);
|
console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n`);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export for Vercel
|
||||||
|
export default app;
|
||||||
|
|||||||
10
vercel.json
Normal file
10
vercel.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"buildCommand": "npm run build",
|
||||||
|
"rewrites": [
|
||||||
|
{
|
||||||
|
"source": "/(.*)",
|
||||||
|
"destination": "/packages/demo-server/index.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user