example

command
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Build

GOOS=js GOARCH=wasm go build -o worker.wasm worker.go

HTTP

Usage of WebAssmbly API in js need a secure context (HTTPS of localhost). Example of a HTTP server for localhost in GO:

package main

import (
	"log"
	"net/http"
)

func main() {
	http.Handle("/", http.FileServer(http.Dir(".")))
	log.Fatal(http.ListenAndServe(":8000", nil))
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL