59

GitHub - hajimehoshi/wasmserve: An HTTP server for testing Wasm like `gopherjs s...

 6 years ago
source link: https://github.com/hajimehoshi/wasmserve
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

README.md

WasmServe

An HTTP server for Wasm testing like gopherjs serve

Usage

Usage of wasmserve
  -http string
        HTTP bind address to serve (default ":8080")
  -tags string
        Build tags

Example

# Build the latest Go.
git clone https://go.googlesource.com/go go-code
cd go-code/src
./make.sh

# Run WasmServe with the latest Go.
# Be careful that `-tags=example` is required to run the below example application.
~/go-code/bin/go run github.com/hajimehoshi/wasmserve -tags=example

And open http://localhost:8080/github.com/hajimehoshi/wasmserve/example/ on your browser.

Example 2

# Install the latest Go like above.

# Install some libraries.
go get github.com/hajimehoshi/wasmserve
go get github.com/hajimehoshi/ebiten
go get github.com/gopherjs/gopherwasm

# Run WasmServe with the latest Go.
~/go-code/bin/go run github.com/hajimehoshi/wasmserve -tags=example

And open http://localhost:8080/github.com/hajimehoshi/ebiten/examples/sprites/ on your browser.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK