mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2026-01-12 01:59:14 +00:00
⚗️
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
@@ -24,5 +25,8 @@ func main() {
|
||||
}
|
||||
})
|
||||
|
||||
wasmhttp.ServeOnce(nil)
|
||||
var release = wasmhttp.Serve(nil)
|
||||
defer release()
|
||||
|
||||
<-context.Background().Done()
|
||||
}
|
||||
|
||||
BIN
docs/api.wasm
BIN
docs/api.wasm
Binary file not shown.
@@ -19,7 +19,7 @@
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<label for="name">Name : </label><input id="name" value="World">
|
||||
<label for="name">Name: </label><input id="name" value="World">
|
||||
<button onclick="hello()">Hello</button>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user