test catch all for react router functions

This commit is contained in:
2020-04-18 03:16:11 +02:00
parent 2971880ee9
commit 057422e816

View File

@@ -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();