19eba1eebd
Set up the HTTP server with Express, attach Socket.IO for real-time messaging, add CORS middleware, async error handling utility, and REST routes for room join/leave/messages/participants. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 lines
158 B
JavaScript
8 lines
158 B
JavaScript
function asyncHandler(handler) {
|
|
return (req, res, next) => {
|
|
Promise.resolve(handler(req, res, next)).catch(next)
|
|
}
|
|
}
|
|
|
|
module.exports = asyncHandler
|