Add service worker and offline page

This commit is contained in:
Korbs 2023-12-15 00:08:34 -05:00
parent 050518132d
commit ba99f09304

View file

@ -87,10 +87,18 @@ module.exports = function (app, config, renderTemplate) {
renderTemplate(res, req, "content-settings.ejs"); renderTemplate(res, req, "content-settings.ejs");
}); });
app.get("/offline", function (req, res) {
res.sendFile("offline.html", { root: location_pwa });
});
app.get("/manifest.json", function (req, res) { app.get("/manifest.json", function (req, res) {
res.sendFile("manifest.json", { root: location_pwa }); res.sendFile("manifest.json", { root: location_pwa });
}); });
app.get("/service-worker.js", function (req, res) {
res.sendFile("service-worker.js", { root: location_pwa });
});
app.get("/customize", function (req, res) { app.get("/customize", function (req, res) {
const tab = req.query.tab; const tab = req.query.tab;