Skip to content

Instantly share code, notes, and snippets.

@MrPeker
Created January 27, 2019 19:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save MrPeker/619bfa1c95115c6210e70cc2ce33d178 to your computer and use it in GitHub Desktop.
const match = ({url, event}) => {
return {
name: 'Workbox',
type: 'guide',
};
};
const handler = ({url, event, params}) => {
// Yanıt “A guide on Workbox” olacaktır
return new Response(
`A ${params.type} on ${params.name}`
);
};
workbox.routing.registerRoute(match, handler);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment