aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorLarsVomMars2021-01-30 17:20:34 +0100
committerLarsVomMars2021-01-30 17:20:34 +0100
commit4fd744f867fc4d5bfcfc53bcf4ac22c1f34e9ef4 (patch)
treef6b368bf44184154144b4964ce6834974086acf4 /app.js
parent1184d47a788ae3320f90de241bf85cc4fc546f97 (diff)
Whoopsie
Diffstat (limited to 'app.js')
-rw-r--r--app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app.js b/app.js
index e2b7410..86d6659 100644
--- a/app.js
+++ b/app.js
@@ -45,11 +45,12 @@ app.use("/prediction", checkUser, prediction);
app.use("/secrets", checkUser, secrets);
app.use("/admin", checkAdmin, admin); // Lel
app.use("/auth", auth);
-app.get("*", (req, res) => res.redirect("/"));
app.get("/images", checkUser, async (req, res) => {
const links = (await fs.readFile(__dirname + "/images.txt", "utf8")).split("\n");
res.redirect(links[req.session.cid - 1]);
});
+app.get("*", (req, res) => res.redirect("/"));
+
app.listen(process.env.PORT || 5005, () => console.log(`Server started on http://localhost:${process.env.PORT}`));