mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-11 01:29:11 +00:00

Adds an example that demonstrates TinyGo compatibility, as well as using a server-side HTTP handler as a fallback.
19 lines
219 B
Go
19 lines
219 B
Go
//go:build wasm
|
|
// +build wasm
|
|
|
|
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
wasmhttp "github.com/nlepage/go-wasm-http-server/v2"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/tiny", goRuntimeHandler)
|
|
|
|
wasmhttp.Serve(nil)
|
|
|
|
select {}
|
|
}
|