summaryrefslogtreecommitdiff
path: root/main.js
diff options
context:
space:
mode:
authorJulien Dessaux2022-10-31 22:40:42 +0100
committerJulien Dessaux2022-10-31 22:40:42 +0100
commitb91bb0a133aa3d0400beb359fed4e641c888ab26 (patch)
tree0b703fab300ab39ffd39708b193bcfa09e89f6f5 /main.js
parentFixed middleware action without return (diff)
downloadjeux-de-mots-b91bb0a133aa3d0400beb359fed4e641c888ab26.tar.gz
jeux-de-mots-b91bb0a133aa3d0400beb359fed4e641c888ab26.tar.bz2
jeux-de-mots-b91bb0a133aa3d0400beb359fed4e641c888ab26.zip
Added logout route, and a way to display the logout menu item on relevant pages
Diffstat (limited to '')
-rw-r--r--main.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.js b/main.js
index 9ad63c7..f4bd1a0 100644
--- a/main.js
+++ b/main.js
@@ -2,6 +2,7 @@ import express from "express";
import helmet from "./middlewares/helmet.js";
import loginRouter from "./routes/login.js";
+import logoutRouter from "./routes/logout.js";
import playRouter from "./routes/play.js";
import rootRouter from "./routes/root.js";
@@ -12,6 +13,7 @@ app.set("views", "./views");
app.set("view engine", "ejs");
app.use("/login", loginRouter);
+app.use("/logout", logoutRouter);
app.use("/play", playRouter);
app.use("/static", express.static("static"));
app.use("/", rootRouter);