# app **Repository Path**: tmacy/app ## Basic Information - **Project Name**: app - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-02-14 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
# app A [WebAssembly](https://webassembly.org) framework to build GUI with [Go](https://golang.org), [HTML](https://en.wikipedia.org/wiki/HTML5) and [CSS](https://en.wikipedia.org/wiki/Cascading_Style_Sheets). It features: - [PWA support](https://developers.google.com/web/progressive-web-apps/) - [Build tool](https://github.com/maxence-charriere/app/tree/master/cmd/goapp/main.go) that removes the hassle of packaging wasm apps - [React](https://reactjs.org) flavored API ## Install Requires [Go 1.13](https://golang.org/doc/go1.13) ```sh # Package sources + goapp CLI: go get -u -v github.com/maxence-charriere/app/cmd/goapp # Package sources only: go get -u -v github.com/maxence-charriere/app/pkg/app ``` ## Getting started ```sh cd $GOPATH/src # go to your gopath sources (optional) mkdir demo && cd demo # create and go to your go package goapp init -v # init project layout goapp run -v -b chrome # run the app and launch the main page on chrome ``` ## How it works ### Project layout ```bash demo └── cmd ├── demo-server │ ├── main.go │ └── web │ ├── style sheets... │ ├── images... │ └── etc... └── demo-wasm └── main.go ``` - The `cmd` directory contains the project main applications. - The `demo-wasm` directory contains the app that is compiled in **wasm** and that will run in the browser. - The `demo-server` directory contains the server that serves the **wasm** app and its resources. - The `web` directory contrains the app resources like style sheets (css), images and other static resources. Project layout can be initialized by running this command in the repository root. ```bash goapp init -v ``` ### App The app is the Go code compiled in web assembly and executed in the browser. ```go // cmd/demo-wasm/main.go package main import ( "log" "github.com/maxence-charriere/app/pkg/app" "github.com/maxence-charriere/app/pkg/log" ) type Hello struct { Name string } func (h *Hello) Render() string { return `