mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-11 01:29:11 +00:00
15 lines
352 B
JavaScript
15 lines
352 B
JavaScript
addEventListener('activate', event => {
|
|
console.log('activate!')
|
|
event.waitUntil(clients.claim())
|
|
})
|
|
|
|
importScripts(
|
|
'https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@latest/lib/wasm_exec/wasm_exec.js',
|
|
'https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@latest/index.js',
|
|
)
|
|
|
|
wasmhttp.serve({
|
|
wasm: 'api.wasm',
|
|
base: '/api',
|
|
})
|