Updated gitignore

This commit is contained in:
DutchEllie 2022-03-01 14:51:45 +01:00
parent 026e7e010c
commit c9ca9a634e
Signed by: DutchEllie
SSH Key Fingerprint: SHA256:dKq6ZSgN5E3Viqrw/+xAdf2VdR6hdRGNyrYqXXwfjTY
1 changed files with 4 additions and 15 deletions

19
main.go
View File

@ -7,19 +7,6 @@ import (
"github.com/maxence-charriere/go-app/v9/pkg/app"
)
// hello is a component that displays a simple "Hello World!". A component is a
// customizable, independent, and reusable UI element. It is created by
// embedding app.Compo into a struct.
type hello struct {
app.Compo
}
// The Render method is where the component appearance is defined. Here, a
// "Hello World!" is displayed as a heading.
func (h *hello) Render() app.UI {
return app.H1().Text("Hello World!")
}
// The main function is the entry point where the app is configured and started.
// It is executed in 2 different environments: A client (the web browser) and a
// server.
@ -50,8 +37,10 @@ func main() {
// required resources to make it work into a web browser. Here it is
// configured to handle requests with a path that starts with "/".
http.Handle("/", &app.Handler{
Name: "Hello",
Description: "An Hello World! example",
Name: "Internetica Galactica",
Description: "A 1990's style PWA!",
,
})
if err := http.ListenAndServe(":8000", nil); err != nil {