mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Missing step from Go documentation should be repeated here for clarity. The 'goexec' command will not work unless this step has been completed.
parent
aa94ba75fd
commit
65a1569ec0
@ -93,14 +93,20 @@ https://github.com/shurcooL/goexec#goexec[`goexec`]:
|
|||||||
$ goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))'
|
$ goexec 'http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))'
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use your own https://play.golang.org/p/pZ1f5pICVbV[basic HTTP server command].
|
Or use your own https://play.golang.org/p/pZ1f5pICVbV[basic HTTP server command].
|
||||||
|
|
||||||
|
Note: for the `goexec` command to work on Unix-like systems, you must [add the PATH environment variable](https://golang.org/doc/install#tarball) for Go to your shell's `profile`. Go's getting started guide explains this:
|
||||||
|
> Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile (for a system-wide installation) or $HOME/.profile:
|
||||||
|
|
||||||
|
> `export PATH=$PATH:/usr/local/go/bin`
|
||||||
|
|
||||||
|
> Note: changes made to a profile file may not apply until the next time you log into your computer
|
||||||
|
|
||||||
Finally, navigate to http://localhost:8080/index.html, open the
|
Finally, navigate to http://localhost:8080/index.html, open the
|
||||||
JavaScript debug console, and you should see the output. You can
|
JavaScript debug console, and you should see the output. You can
|
||||||
modify the program, rebuild `main.wasm`, and refresh to see new
|
modify the program, rebuild `main.wasm`, and refresh to see new
|
||||||
output.
|
output.
|
||||||
|
|
||||||
|
|
||||||
# Executing WebAssembly with Node.js
|
# Executing WebAssembly with Node.js
|
||||||
|
|
||||||
It's possible to execute compiled WebAssembly modules using Node.js
|
It's possible to execute compiled WebAssembly modules using Node.js
|
Loading…
x
Reference in New Issue
Block a user