I'm listening to
${`${jsonRes.info.name} by ${jsonRes.info.artistName}`}
from ${jsonRes.info.albumName}
song.link `
+// } else {
+// return 1
+// }
+
+// }
+// })
+// }
+// }).catch(fetchError => {
+// console.error("Error fetch()ing upstream Cider host: "+fetchError)
+// return 1 // If something else happens then log it and return 1, indicating error.
+// })
+// }
module.exports = {app} // export routes to be imported by index for execution
\ No newline at end of file
From 45b7b3541f861b63aa357af325f4ec246a61625c Mon Sep 17 00:00:00 2001
From: Enstrayed <48845980+Enstrayed@users.noreply.github.com>
Date: Wed, 12 Jun 2024 17:44:59 -0700
Subject: [PATCH 2/4] god I fucking hate CORS I should just do this in caddy
---
routes/cider.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/routes/cider.js b/routes/cider.js
index 22118b6..7f26a18 100644
--- a/routes/cider.js
+++ b/routes/cider.js
@@ -5,6 +5,7 @@ var currentListening = {}
var currentListeningHtml = ""
app.get("/cider", (rreq,rres) => {
+ rres.set("Access-Control-Allow-Origin","*")
rres.send("