Update server.js
Browse files
server.js
CHANGED
|
@@ -209,6 +209,7 @@ app.use((err, req, res, next) => {
|
|
| 209 |
io.emit('terminal-output', `ERROR: ${err.message}\n`);
|
| 210 |
next();
|
| 211 |
});
|
|
|
|
| 212 |
// Start server
|
| 213 |
const PORT = process.env.PORT || 7860;
|
| 214 |
connectDB().then(() => {
|
|
@@ -224,4 +225,5 @@ process.on('uncaughtException', (err) => {
|
|
| 224 |
});
|
| 225 |
|
| 226 |
process.on('unhandledRejection', (reason, promise) => {
|
| 227 |
-
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
|
|
|
|
|
| 209 |
io.emit('terminal-output', `ERROR: ${err.message}\n`);
|
| 210 |
next();
|
| 211 |
});
|
| 212 |
+
});
|
| 213 |
// Start server
|
| 214 |
const PORT = process.env.PORT || 7860;
|
| 215 |
connectDB().then(() => {
|
|
|
|
| 225 |
});
|
| 226 |
|
| 227 |
process.on('unhandledRejection', (reason, promise) => {
|
| 228 |
+
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
| 229 |
+
});
|