diff --git a/backend/index.js b/backend/index.js index 0fbb3f1..b03386d 100644 --- a/backend/index.js +++ b/backend/index.js @@ -26,6 +26,12 @@ app.all("*", function (req, res, next) { if (!serverStartupComplete) return res.send("Server is starting..."); else return next(); +}); + +app.all("*", function (req, res, next) { + if (!/^\/API\/.*/.test(req.url)) { + return res.sendFile(path.join(__dirname, './frontend/index.html')); + } else return next(); }) app.get('/API/day', function (req, res) {