From 12acb8041060306b361109b46f9f05dbb4382ea0 Mon Sep 17 00:00:00 2001 From: Markus Wüstenberg Date: Thu, 19 Sep 2024 21:45:31 +0200 Subject: Add full example app (#204) Also, remove the other examples and simplify the readme.--- internal/examples/app/http/server.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/examples/app/http/server.go (limited to 'internal/examples/app/http/server.go') diff --git a/internal/examples/app/http/server.go b/internal/examples/app/http/server.go new file mode 100644 index 0000000..8264fcf --- /dev/null +++ b/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 +} -- cgit 1.4.1