From cf1f9a0dcbc01669e13dada2448d6c69cca49d27 Mon Sep 17 00:00:00 2001 From: Sendou <38327916+Sendouc@users.noreply.github.com> Date: Sat, 16 May 2020 09:52:41 +0300 Subject: [PATCH] compression try number 2 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f816903a6..ba8312c96 100644 --- a/index.js +++ b/index.js @@ -175,6 +175,8 @@ if (process.env.NODE_ENV === "production") { app.use(session(sess)) +app.use(compression()) + app.use(express.static("build")) app.use(passport.initialize()) @@ -199,8 +201,6 @@ app.get("/logout", function (req, res) { res.redirect("/") }) -app.use(compression()) - app.get("*", (req, res) => { res.sendFile(path.resolve(__dirname, "build", "index.html")) })