🚚 Move hello to its own dir

This commit is contained in:
Nicolas Lepage
2021-01-22 15:28:37 +01:00
parent 078ff3547e
commit d9eacdc8e1
4 changed files with 5 additions and 17 deletions

11
docs/hello/sw.js Normal file
View File

@@ -0,0 +1,11 @@
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@078ff3547ebe2abfbee1fd5af9ca5ad64be480c0/sw.js')
addEventListener('install', (event) => {
event.waitUntil(skipWaiting())
})
addEventListener('activate', event => {
event.waitUntil(clients.claim())
})
registerWasmHTTPListener('api.wasm', { base: 'api' })