diff --git a/app.js b/app.js index 499ef6e..76fb2a9 100644 --- a/app.js +++ b/app.js @@ -44,4 +44,12 @@ server.on('upgrade', (req, socket, head) => { server.listen(PORT); +if (process.env.UNSAFE_CONTINUE) + process.on("uncaughtException", (err, origin) => { + console.error(`Critical error (${origin}):`) + console.error(err) + console.error("UNSAFELY CONTINUING EXECUTION") + console.error() + }) + console.log(`Server running at http://localhost:${PORT}/.`);