go-wasm-http-server
go-wasm-http-server copied to clipboard
Embed your Go HTTP handlers in a ServiceWorker and emulate an HTTP server!
Study the possibility of using [ReadableStream](https://mdn.io/ReadableStream) for the JS response.
when use golang direct run,it's perfect: https://user-images.githubusercontent.com/342509/128476357-3f6f97de-7f09-4b16-97b7-39571450390c.mov ```go package main import ( "fmt" "net/http" "time" ) func main() { http.HandleFunc("/wawawa", func(res http.ResponseWriter, req *http.Request) { flusher := res.(http.Flusher) res.Header().Set("Content-Type", "text/html")...
To allow service in client and server to push CDC updates when data sources change. Create, Update, Delete are the ops. namespace topic that maps to json fragment is the...
Really cleanly done @nlepage If your interested I will be adding the following: 1. pass through so that Service side rendering can occur for SEO. 2. Detection of search engine....
Try tinygo to reduce overhead. Json works but not gob encoding btw.
https://github.com/hack-pad/safejs Will make catching bad js callls better . makos faster
Go now supports directives to import and export functions to/from the compiled wasm binary, see [documentation](https://pkg.go.dev/cmd/compile#hdr-WebAssembly_Directives). This directives could be used to simplify how go-wasm-http-server interacts with the browser. `wasmimport`...
Fasthttp is an alternative http server package that is substantially faster. This would be great if it supports that.