bugfix lets try this
This commit is contained in:
@@ -23,15 +23,19 @@ async function loadData() {
|
|||||||
}
|
}
|
||||||
loadData();
|
loadData();
|
||||||
|
|
||||||
app.all("*", function (req, res, next) {
|
app.get("*", function (req, res, next) {
|
||||||
if (!serverStartupComplete)
|
if (!serverStartupComplete)
|
||||||
return res.send("Server is starting...");
|
return res.send("Server is starting...");
|
||||||
else return next();
|
else return next();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.all("*", function (req, res, next) {
|
app.use(express.static(path.join(__dirname, 'frontend')));
|
||||||
|
|
||||||
|
|
||||||
|
app.use(express.static(`${__dirname}/./frontend`));
|
||||||
|
app.all("/", function (req, res, next) {
|
||||||
if (!/^\/API\/.*/.test(req.url)) {
|
if (!/^\/API\/.*/.test(req.url)) {
|
||||||
return res.sendFile(path.join(__dirname, './frontend/index.html'));
|
return res.sendFile(path.join(__dirname, 'frontend', 'index.html'));
|
||||||
} else return next();
|
} else return next();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user