all repos — gomponents @ 12acb8041060306b361109b46f9f05dbb4382ea0

HTML components in pure Go

Add full example app (#204) Also, remove the other examples and simplify the readme.

Markus Wüstenberg
commit

12acb8041060306b361109b46f9f05dbb4382ea0

parent

69b0da41dff1813f3939cf4ea09fbbb2d06b7719

1 file changed, 18 insertions(+), 0 deletions(-)

changed files
A internal/examples/app/http/server.go
@@ -0,0 +1,18 @@
+package http + +import ( + "net/http" +) + +func Start() error { + return http.ListenAndServe(":8080", setupRoutes()) +} + +func setupRoutes() http.Handler { + mux := http.NewServeMux() + + Home(mux) + About(mux) + + return mux +}