This commit is contained in:
Nicolas Lepage 2019-11-27 14:23:58 +01:00
parent 75a141520e
commit d9b34161e6
No known key found for this signature in database
GPG Key ID: B0879E35E66D8F6F
2 changed files with 3 additions and 9 deletions

View File

@ -14,7 +14,7 @@
> WebAssembly Go HTTP Server embedded in a ServiceWorker
### ✨ [Demo](https://nlepage.github.io/go-wasm-http-server/demo)
### ✨ [Demo](https://nlepage.github.io/go-wasm-http-server/)
## Install

View File

@ -3,10 +3,7 @@ importScripts(
'https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@96677e251874f074906c61ccebd283c63cdec54d/index.js',
)
console.log('scope', registration.scope)
addEventListener('install', event => {
console.log('install!')
addEventListener('install', () => {
wasmhttp.serve({
wasm: 'api.wasm',
base: '/api',
@ -14,7 +11,4 @@ addEventListener('install', event => {
skipWaiting()
})
addEventListener('activate', event => {
console.log('activate!')
event.waitUntil(clients.claim())
})
addEventListener('activate', event => event.waitUntil(clients.claim()))