From 057422e81611308cd766f027f25f3decef7f16ef Mon Sep 17 00:00:00 2001 From: Oliver Boehlk Date: Sat, 18 Apr 2020 03:16:11 +0200 Subject: [PATCH] test catch all for react router functions --- backend/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/index.js b/backend/index.js index 885a8aa..eac210b 100644 --- a/backend/index.js +++ b/backend/index.js @@ -33,7 +33,7 @@ app.use(express.static(path.join(__dirname, 'frontend'))); app.use(express.static(`${__dirname}/./frontend`)); -app.all("/", function (req, res, next) { +app.all("/*", function (req, res, next) { if (!/^\/simcompanies\/API\/.*/.test(req.url)) { return res.sendFile(path.join(__dirname, 'frontend', 'index.html')); } else return next();