From 757e56c9e3ba05fe8f5207d469d80374913288ae Mon Sep 17 00:00:00 2001 From: "Glitch (hello-express)" Date: Wed, 18 Dec 2019 16:40:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8D=F0=9F=8D=AE=20Checkpoint=20./serve?= =?UTF-8?q?r.js:933874/240?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index c185ff3..7eba80e 100644 --- a/server.js +++ b/server.js @@ -32,10 +32,10 @@ const redirectToHTTPS = (req, res, next) => { res.redirect("https://" + req.headers.host + req.url); } }; -app.use("/", redirectToHTTPS); app.use("/api", redirectToHTTPS); app.use("/img", redirectToHTTPS); +app.get("/", redirectToHTTPS); app.get("/", (req, res) => { res.sendFile(__dirname + "/views/index.html"); });