This commit is contained in:
@@ -63,7 +63,7 @@ app.use("/api", router);
|
|||||||
const staticDir = process.env.STATIC_DIR;
|
const staticDir = process.env.STATIC_DIR;
|
||||||
if (staticDir && existsSync(staticDir)) {
|
if (staticDir && existsSync(staticDir)) {
|
||||||
app.use(express.static(staticDir));
|
app.use(express.static(staticDir));
|
||||||
app.get("*", (_req, res) => {
|
app.get("/*any", (_req, res) => {
|
||||||
res.sendFile(resolve(staticDir, "index.html"));
|
res.sendFile(resolve(staticDir, "index.html"));
|
||||||
});
|
});
|
||||||
logger.info({ staticDir }, "Serving static files");
|
logger.info({ staticDir }, "Serving static files");
|
||||||
|
|||||||
Reference in New Issue
Block a user