Skip to content

Commit

Permalink
Update server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
createunique authored Mar 23, 2024
1 parent cb343ae commit 590cdc4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ io.on('connection', function(socket) {
});
});

module.exports = (req, res) => {
return server.emit('request', req, res);
};

// Catch-all route handler
app.get('*', (req, res) => {
res.status(404).send('Page not found');
});
// app.get('*', (req, res) => {
// res.status(404).send('Page not found');
// });

server.listen(process.env.PORT || 3000, () => {
console.log("Server started on port 3000");
});
// server.listen(process.env.PORT || 3000, () => {
// console.log("Server started on port 3000");
// });

0 comments on commit 590cdc4

Please sign in to comment.