Skip to content

Commit

Permalink
Add error handling for server startup in card and echo bot samples
Browse files Browse the repository at this point in the history
  • Loading branch information
rido-min committed Mar 6, 2025
1 parent e024ba3 commit 3837731
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/basic/cards/nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ app.post('/api/messages', async (req: Request, res: Response) => {
const port = process.env.PORT || 3978
app.listen(port, () => {
console.log(`\nServer listening to port ${port} for appId ${authConfig.clientId}`)
}).on('error', (err) => {
console.error(err)
process.exit(1)
})
3 changes: 3 additions & 0 deletions samples/basic/echo-bot/nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ app.post('/api/messages', async (req: Request, res: Response) => {
const port = process.env.PORT || 3978
app.listen(port, () => {
console.log(`\nServer listening to port ${port} for appId ${authConfig.clientId} debug ${process.env.DEBUG}`)
}).on('error', (err) => {
console.error(err)
process.exit(1)
})

0 comments on commit 3837731

Please sign in to comment.