about summary refs log tree commit diff
path: root/nix/templates/goapp/frontend/src/main.go
diff options
context:
space:
mode:
authorEmile <git@emile.space>2025-02-12 22:05:22 +0100
committerEmile <git@emile.space>2025-02-12 22:05:22 +0100
commit7152205c80f059d3649e1830fb4dfc46d1fc158f (patch)
treeb0d9a9aea760fabd61ee5cb06814d45cac5bb629 /nix/templates/goapp/frontend/src/main.go
parent4d08790c43b2d0720ef43b657a651a7c541d30d2 (diff)
template: the goapp docker package should now (in theory) build
It's quite a weird way to pull out the packge name from the attribute
set of defined packages, yet it kind of works.

I can't test it, as docker doesn't want to run Mach-O binaries, but
kicking this into hydra should result in some nice builds.
Diffstat (limited to 'nix/templates/goapp/frontend/src/main.go')
-rw-r--r--nix/templates/goapp/frontend/src/main.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/nix/templates/goapp/frontend/src/main.go b/nix/templates/goapp/frontend/src/main.go
deleted file mode 100644
index adb15cd..0000000
--- a/nix/templates/goapp/frontend/src/main.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package main
-
-import (
-	"fmt"
-	"log"
-	"net/http"
-	"time"
-
-	"github.com/gorilla/mux"
-)
-
-func indexHandler(w http.ResponseWriter, r *http.Request) {
-	fmt.Fprintf(w, "Hello World from the frontend")
-}
-
-func main() {
-	r := mux.NewRouter()
-	r.HandleFunc("/", indexHandler)
-
-	srv := &http.Server{
-		Handler:      r,
-		Addr:         ":8080",
-		WriteTimeout: 15 * time.Second,
-		ReadTimeout:  15 * time.Second,
-	}
-
-	log.Printf("[i] Running the server on %s", srv.Addr)
-	log.Fatal(srv.ListenAndServe())
-}