all repos — flounder @ b4a35f3a09684d4186607380551ba803b06f9f3f

A small site builder for the Gemini protocol

Hello world server
alex wennerberg alex@alexwennerberg.com
Tue, 25 Aug 2020 16:55:04 -0700
commit

b4a35f3a09684d4186607380551ba803b06f9f3f

2 files changed, 19 insertions(+), 0 deletions(-)

jump to
A README.md

@@ -0,0 +1,3 @@

+# Flounder in Go + +Experimental rewrite of Flounder in Go
A main.go

@@ -0,0 +1,16 @@

+package main + +import ( + "fmt" + "log" + "net/http" +) + +func handler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) +} + +func main() { + http.HandleFunc("/", handler) + log.Fatal(http.ListenAndServe(":8080", nil)) +}