mirror of
https://github.com/cupcakearmy/blaze.git
synced 2025-12-07 19:55:00 +00:00
Show info page in case of error
This commit is contained in:
12
index.ts
12
index.ts
@@ -134,10 +134,14 @@ app.get("/", async (req, res) => {
|
||||
</html>
|
||||
`;
|
||||
|
||||
const minifiedSerp = minify(html, minifierOptions);
|
||||
|
||||
res.set("X-Blaze-Etag", etag(minifiedSerp));
|
||||
res.send(minifiedSerp);
|
||||
try {
|
||||
const minifiedSerp = minify(html, minifierOptions);
|
||||
res.set("X-Blaze-Etag", etag(minifiedSerp));
|
||||
res.send(minifiedSerp);
|
||||
} catch (e) {
|
||||
console.log("Error during html minifier:", e);
|
||||
res.sendFile(path.join(__dirname, "/not_blazed.html"));
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user