From 94ce6aa8068a97179cc91a211dd511c06de7926e Mon Sep 17 00:00:00 2001 From: Maciej Kotowski Date: Mon, 4 Oct 2021 17:22:40 +0200 Subject: [PATCH] routing fix --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 0101246..fdc28e2 100644 --- a/index.js +++ b/index.js @@ -55,7 +55,9 @@ app.post("/api/createEvent", (req, res) => { res.status(200).json("ok"); }); }); - +app.use((req, res, next) => { + res.sendFile(path.join(__dirname+'/client/build/index.html')); +}) app.listen(port, () => { console.log(`Example app listening at http://localhost:${port}`); });