diff options
| author | Adam Soltys <[email protected]> | 2023-11-30 15:34:45 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-30 15:34:45 -0800 |
| commit | a7322928c45848cfb9984454bf8ece6e3439c673 (patch) | |
| tree | 9b1031c31ee1f8160306ac66749afe0802f8aa54 /index.js | |
| parent | acb93f29e83b35c0917d88ebbc62812e2dff989f (diff) | |
| download | coinos-server-a7322928c45848cfb9984454bf8ece6e3439c673.tar.gz coinos-server-a7322928c45848cfb9984454bf8ece6e3439c673.zip | |
zaps and emails
Diffstat (limited to 'index.js')
| -rw-r--r-- | index.js | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -6,6 +6,7 @@ import { listenForLightning } from "$lib/lightning"; import { getLocations } from "$lib/locations"; import { getRates, sendRates } from "$lib/rates"; import { sendHeartbeat } from "$lib/sockets"; +import { err } from "$lib/logging"; import email from "$routes/email"; import info from "$routes/info"; @@ -19,10 +20,13 @@ import payments from "$routes/payments"; import requests from "$routes/requests"; import shopify from "$routes/shopify"; -fillPool(); - -getLocations(); -getRates(); +try { + fillPool(); + getLocations(); + getRates(); +} catch (e) { + console.log(e); +} setTimeout(listenForLightning, 2000); @@ -84,6 +88,7 @@ app.post("/upload/:type", users.upload); app.get("/users/delete/:username", users.del); app.post("/acl", users.acl); app.post("/superuser", users.superuser); +app.post("/verify", users.verify); app.post("/login", users.login); @@ -105,3 +110,5 @@ let host = process.env.HOST || "0.0.0.0"; let port = process.env.PORT || 3119; app.listen({ host, port }); + + process.on("unhandledRejection", () => err("Unhandled error")); |
