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