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??? --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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 :)')) -- cgit