Self-host compose stack and production stability fixes

这个提交包含在:
cryptocommuniums-afk
2026-03-14 22:25:19 +08:00
父节点 f5ad0449a8
当前提交 8df0f91db7
修改 19 个文件,包含 329 行新增54 行删除

查看文件

@@ -46,22 +46,3 @@ export async function setupVite(app: Express, server: Server) {
}
});
}
export function serveStatic(app: Express) {
const distPath =
process.env.NODE_ENV === "development"
? path.resolve(import.meta.dirname, "../..", "dist", "public")
: path.resolve(import.meta.dirname, "public");
if (!fs.existsSync(distPath)) {
console.error(
`Could not find the build directory: ${distPath}, make sure to build the client first`
);
}
app.use(express.static(distPath));
// fall through to index.html if the file doesn't exist
app.use("*", (_req, res) => {
res.sendFile(path.resolve(distPath, "index.html"));
});
}