Hi 👋 I'd like to share
Welcome to go-wasm-http-server
Build your Go HTTP Server to WebAssembly and embed it in a ServiceWorker!
- Hello example (sources)
- Hello example with state (sources)
- Hello example with state and keepalive (sources)
😺Catption generator example (sources)
- Random password generator web server (sources forked from jbarham/random-password-please)
Talk given at the Go devroom of FOSDEM 2021 explaining how
The slides are available here.
go-wasm-http-server can help you put up a demonstration for a project without actually running a Go HTTP server.
go-wasm-http-server requires you to build your Go application to WebAssembly, so you need to make sure your code is compatible:
- no C bindings
- no System dependencies such as file system or network (database server for example)
Step 1: Build to
This project allows you to build Go HTTP handlers to WebAssembly and embed it in a ServiceWorker to emulate an HTTP server!
I'd really appreciate to have feedback from people who would give it a try 🙂
The readme has a usage section and some examples to guide you.
Here is a video from FOSDEM 21 explaining how this works:
Contributions on the project are more than welcome.