flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit b4a35f3a09684d4186607380551ba803b06f9f3f
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Tue, 25 Aug 2020 16:55:04 -0700

Hello world server

Diffstat:
AREADME.md | 3+++
Amain.go | 16++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,3 @@ +# Flounder in Go + +Experimental rewrite of Flounder in Go diff --git a/main.go b/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)) +}