diff options
author | mat <github@matdoes.dev> | 2021-05-30 00:50:52 -0500 |
---|---|---|
committer | mat <github@matdoes.dev> | 2021-05-30 00:50:52 -0500 |
commit | 9ce197d8c677c08e6bef436a1a1c7c6f7cdb443a (patch) | |
tree | e0a2b4dab743ae75d1d8db4c1a17c25aed4f0f1e /build | |
parent | 776a3ab5f6d717d88691044732d2a9d00f1ca772 (diff) | |
download | skyblock-api-9ce197d8c677c08e6bef436a1a1c7c6f7cdb443a.tar.gz skyblock-api-9ce197d8c677c08e6bef436a1a1c7c6f7cdb443a.tar.bz2 skyblock-api-9ce197d8c677c08e6bef436a1a1c7c6f7cdb443a.zip |
do more things to maybe prevent random crashes???
Diffstat (limited to 'build')
-rw-r--r-- | build/index.js | 2 |
1 files changed, 2 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 :)')); |