Need help with go-web-app?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

talentlessguy
156 Stars 9 Forks MIT License 63 Commits 5 Opened issues

Description

📦 CLI for setting up a Go WebAssembly frontend app

Services available

!
?

Need anything else?

Contributors list

# 38,688
Three.j...
nodejs-...
Deno
OCaml
55 commits
# 139,441
gtk
vala
appcent...
Electro...
4 commits

go-web-app cover

GitHub code size in bytes Go Report Card Codacy grade

Simple CLI for setting up Go WebAssembly frontend app.

What's included

  • 🛠️ Dev Server with live reload
  • 🗜️ TinyGo for small WebAssembly output
  • ➡ Git setup with files (such as
    README.md
    )
  • 🩹 Glue files (
    index.html
    +
    wasm_exec.js
    )

Requirements

  • Go 1.12+
  • Browser that supports WebAssembly
  • lld
    (LLVM linker)

Install

go get github.com/talentlessguy/go-web-app

Then use as

go-web-app
.

CLI Reference

go-web-app init 

Initialize a project in a picked directory.

Project tree

out.wasm
is generated when building. Other files are automatically added.
├── src
│   └── main.go
├── build
│   └── out.wasm
├── go.mod
├── index.html
├── README.md
└── wasm_exec.js

go-web-app dev --port 

Builds the project on first run and launches a development server with specified port.

Default port is 8080.

After launching a server, you should go to

http://localhost:

Every time you change a file in

src
dev server automatically compiles and updates the page.

go-web-app build

Compiles go code to WebAssembly. Compiled

out.wasm
file could be found in
build
folder.

Everything in

src
compiles to
build
, every go file.

After build, binary size is shown

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.