Skip to content
Snippets Groups Projects
Commit 0ca52371 authored by syuilo's avatar syuilo
Browse files

Send servicewroker script

parent d692bb3c
No related branches found
No related tags found
No related merge requests found
......@@ -66,9 +66,11 @@ router.get('/apple-touch-icon.png', async ctx => {
});
// ServiceWroker
//router.get(/^\/sw\.(.+?)\.js$/, async ctx => {
// await send(ctx, `${client}/assets/sw.${ctx.params[0]}.js`);
//});
router.get(/^\/sw\.(.+?)\.js$/, async ctx => {
await send(ctx, `/assets/sw.${ctx.params[0]}.js`, {
root: client
});
});
// Manifest
router.get('/manifest.json', async ctx => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment