mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
⚗️
This commit is contained in:
parent
75a141520e
commit
d9b34161e6
@ -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
|
||||
|
||||
|
10
docs/sw.js
10
docs/sw.js
@ -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()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user