/wasmgo-sketchbook

My sketchbook for the wasm with golang.

Primary LanguageHTMLMIT LicenseMIT

wasmgo-sketchbook

My sketchbook for the wasm with golang. Please refer the WebAssembly.

How to build and serve

Write it with a command using fish shell.

env GOOS=js GOARCH=wasm go build -o main.wasm
cp (go env GOROOT)/misc/wasm/wasm_exec.js .
go get -u github.com/shurcooL/goexec
goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))'