diff options
author | LarsVomMars | 2021-01-30 17:20:34 +0100 |
---|---|---|
committer | LarsVomMars | 2021-01-30 17:20:34 +0100 |
commit | 4fd744f867fc4d5bfcfc53bcf4ac22c1f34e9ef4 (patch) | |
tree | f6b368bf44184154144b4964ce6834974086acf4 /app.js | |
parent | 1184d47a788ae3320f90de241bf85cc4fc546f97 (diff) |
Whoopsie
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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}`)); |