Configure your environment
Before startint your first project, it's best to spend some time setting up your work environment. This will allow you to save working time and productivity.
Use WebAssembly in your IDE
By default, the GOOS AND GOARCH follow your config hardware. The binary product by go must be in "webassembly" format. To configure Go, you must set the GOOS and GOARCH env variable with value:
GOOS=js and GOARCH=wasm
For visual studio code, create a .vscode/settings.json file with:
Live testing
The normal way to test your app is compile your app in a wasm file with go or tinygo, upload it to a static serve file, and test with your favorite browser.
The only drawback is that solution works only with chrome for the moment.
Install wasmbrowsertest:
You are now ready to run your first project now
Last updated