High level PWA creation library
surdeus 1f2386d9c8 feat: WE ARE HERE. | 10 månader sedan | |
---|---|---|
.github | 1 år sedan | |
analytics | 10 månader sedan | |
app | 10 månader sedan | |
cache | 11 månader sedan | |
cli | 10 månader sedan | |
cmd | 10 månader sedan | |
docs | 10 månader sedan | |
errors | 11 månader sedan | |
logs | 10 månader sedan | |
ui | 10 månader sedan | |
.gitattributes | 6 år sedan | |
.gitignore | 10 månader sedan | |
code-of-conduct.md | 11 månader sedan | |
contibuting.md | 11 månader sedan | |
go.mod | 10 månader sedan | |
go.sum | 1 år sedan | |
html-mount.new.txt | 2 år sedan | |
license.txt | 11 månader sedan | |
makefile | 11 månader sedan | |
readme.md | 11 månader sedan |
Go-app is a package for building progressive web apps (PWA) with the Go programming language (Golang) and WebAssembly (Wasm).
Shaping a UI is done by using a declarative syntax that creates and compose HTML elements only by using the Go programing language.
It uses Go HTTP standard model.
An app created with go-app can out of the box runs in its own window, supports offline mode, and is SEO friendly.
go-app requirements:
Go-app uses a declarative syntax so you can write reusable component-based UI elements just by using the Go programming language.
Here is a Hello World component that takes an input and displays its value in its title:
type hello struct {
app.Compo
name string
}
func (h *hello) Render() app.UI {
return app.Div().Body(
app.H1().Body(
app.Text("Hello, "),
app.If(h.name != "",
app.Text(h.name),
).Else(
app.Text("World!"),
),
),
app.P().Body(
app.Input().
Type("text").
Value(h.name).
Placeholder("What is your name?").
AutoFocus(true).
OnChange(h.ValueTo(&h.name)),
),
)
}
Apps created with go-app complies with Go standard HTTP package interfaces.
func main() {
// Components routing:
app.Route("/", &hello{})
app.Route("/hello", &hello{})
app.RunWhenOnBrowser()
// HTTP routing:
http.Handle("/", &app.Handler{
Name: "Hello",
Description: "An Hello World! example",
})
if err := http.ListenAndServe(":8000", nil); err != nil {
log.Fatal(err)
}
}
Read the Getting Started document.
This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain go-app development. [Contribute]
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]