From 7193ad1044d2dfad8f929f0951f9a3601c056f67 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 8 Feb 2018 17:31:05 +0100 Subject: Add service worker --- server/controllers/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 28b42911a..f07e421b4 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -11,7 +11,7 @@ const clientsRouter = express.Router() const distPath = join(root(), 'client', 'dist') const assetsImagesPath = join(root(), 'client', 'dist', 'client', 'assets', 'images') -const manifestPath = join(root(), 'client', 'dist', 'client', 'manifest.json') +const manifestPath = join(root(), 'client', 'dist', 'manifest.json') const embedPath = join(distPath, 'standalone', 'videos', 'embed.html') const indexPath = join(distPath, 'index.html') @@ -26,8 +26,8 @@ clientsRouter.use('/videos/embed', (req: express.Request, res: express.Response, }) // Static HTML/CSS/JS client files +clientsRouter.use('/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE })) clientsRouter.use('/client', express.static(distPath, { maxAge: STATIC_MAX_AGE })) -clientsRouter.use('/client/manifest.json', express.static(manifestPath, { maxAge: STATIC_MAX_AGE })) clientsRouter.use('/client/assets/images', express.static(assetsImagesPath, { maxAge: STATIC_MAX_AGE })) // 404 for static files not found -- cgit v1.2.3