From 9ce197d8c677c08e6bef436a1a1c7c6f7cdb443a Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 30 May 2021 00:50:52 -0500 Subject: do more things to maybe prevent random crashes??? --- build/index.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build') diff --git a/build/index.js b/build/index.js index 70d11d0..a799d2a 100644 --- a/build/index.js +++ b/build/index.js @@ -163,6 +163,8 @@ app.post('/accounts/update', async (req, res) => { res.json({ ok: false }); } }); +process.on('uncaughtException', err => console.error(err)); +process.on('unhandledRejection', (err, promise) => console.error(promise, err)); // only run the server if it's not doing tests if (!globalThis.isTest) app.listen(8080, () => console.log('App started :)')); -- cgit