From dce07aa93b3c2f47aca0c24cea6adde9ec37f1a7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 8 Jan 2023 21:05:34 -0800 Subject: tech debt jubilee --- index.js | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index e77ba2a8..b5ec0dca 100644 --- a/index.js +++ b/index.js @@ -1,52 +1,24 @@ import app from "./app"; -import persist from "./lib/persist"; -import config from "./config/index"; -import store from "./lib/store"; import { l, err } from "./lib/logging"; -import { optionalAuth } from "$lib/passport"; -import "./db"; import "./lib/redis"; import "./lib/sockets"; -import "./lib/webhooks"; import "./lib/passport"; import "./lib/upload"; -import "./lib/sync"; import "./lib/rates"; import "./lib/notifications"; import "./lib/mail"; import "./lib/nostr"; -import "./routes/assets"; -import "./routes/events"; import "./routes/locations"; -import "./routes/info"; -import "./routes/users"; import "./routes/invoices"; import "./routes/payments"; +import "./routes/users"; import "./routes/requests"; import "./routes/lnurl"; -import "./routes/tickets"; - -if (config.bitcoin) store.networks.push("bitcoin"); -if (config.liquid) store.networks.push("liquid"); -if (config.lna) store.networks.push("lightning"); let host = process.env.HOST || "0.0.0.0"; let port = process.env.PORT || 3119; - -app.post('/echo', optionalAuth, async (req, res) => { - console.log(req.user.username) - console.log(req.body) - res.send(req.body); -}); - -app.get('/nostr.json', async (req, res) => { - res.send({ - names: { adam: "566c166f3adab0c8fba5da015b0b3bcc8eb3696b455f2a1d43bfbd97059646a8", asoltys: "566c166f3adab0c8fba5da015b0b3bcc8eb3696b455f2a1d43bfbd97059646a8" } - }); -}); - app.listen({ host, port }, (e, address) => { e && err(e) && process.exit(1); l(`CoinOS Server listening on ${address}`); -- cgit v1.2.3