diff options
-rw-r--r-- | build/index.js | 2 | ||||
-rw-r--r-- | src/index.ts | 3 |
2 files changed, 5 insertions, 0 deletions
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 :)')); diff --git a/src/index.ts b/src/index.ts index fe6ea90..642e9b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -162,6 +162,9 @@ app.post('/accounts/update', async(req, res) => { } }) +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 :)')) |