mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
docs: adds FAQ mentionning websockets and tinygo
This commit is contained in:
parent
9be33ecb4d
commit
065e91545b
13
README.md
13
README.md
@ -20,7 +20,6 @@
|
|||||||
- [Random password generator web server](https://nlepage.github.io/random-password-please/) ([sources](https://github.com/nlepage/random-password-please) forked from [jbarham/random-password-please](https://github.com/jbarham/random-password-please))
|
- [Random password generator web server](https://nlepage.github.io/random-password-please/) ([sources](https://github.com/nlepage/random-password-please) forked from [jbarham/random-password-please](https://github.com/jbarham/random-password-please))
|
||||||
- [Server fallbacks, and compiling with TinyGo](https://nlepage.github.io/go-wasm-http-server/tinygo/) (runs locally; see [sources & readme](https://github.com/nlepage/go-wasm-http-server/tree/master/docs/tinygo#readme) for how to run this example)
|
- [Server fallbacks, and compiling with TinyGo](https://nlepage.github.io/go-wasm-http-server/tinygo/) (runs locally; see [sources & readme](https://github.com/nlepage/go-wasm-http-server/tree/master/docs/tinygo#readme) for how to run this example)
|
||||||
|
|
||||||
|
|
||||||
## How?
|
## How?
|
||||||
|
|
||||||
Talk given at the Go devroom of FOSDEM 2021 explaining how `go-wasm-http-server` works:
|
Talk given at the Go devroom of FOSDEM 2021 explaining how `go-wasm-http-server` works:
|
||||||
@ -187,6 +186,18 @@ An optional object containing:
|
|||||||
- `args` (`string[]`): Arguments for the WebAssembly module.
|
- `args` (`string[]`): Arguments for the WebAssembly module.
|
||||||
- `passthrough` (`(request: Request): boolean`): Optional callback to allow passing the request through to network.
|
- `passthrough` (`(request: Request): boolean`): Optional callback to allow passing the request through to network.
|
||||||
|
|
||||||
|
## <abbr title="Frequently Asked Questions">FAQ</abbr> ❓
|
||||||
|
|
||||||
|
### Are WebSockets supported?
|
||||||
|
|
||||||
|
No, WebSockets aren’t and won’t be supported, because Service Workers cannot intercept websocket connections.
|
||||||
|
|
||||||
|
However [Server Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events), which is an alternative to WebSockets, are supported, you can find the code for an example [here](https://github.com/nlepage/go-wasm-http-server/tree/master/docs/hello-sse) and the demo [here](https://nlepage.github.io/go-wasm-http-server/hello-sse/).
|
||||||
|
|
||||||
|
### Is it compatible with TinyGo?
|
||||||
|
|
||||||
|
Yes, an example and some specific information is available [here](https://github.com/nlepage/go-wasm-http-server/tree/master/docs/tinygo).
|
||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
|
|
||||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user