handle server errors (#91)
This commit is contained in:
parent
4200a46fc2
commit
3dde360dc9
1 changed files with 50 additions and 10 deletions
|
|
@ -85,7 +85,11 @@ app.post("/mcp", async (req: Request, res: Response) => {
|
|||
}
|
||||
});
|
||||
|
||||
const httpServer = app.listen(PORT, () => {
|
||||
const httpServer = app.listen(PORT, err => {
|
||||
if (err) {
|
||||
console.error("Error starting server:", err);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(`Server listening on http://localhost:${PORT}/mcp`);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue