some qa
alex wennerberg alex@alexwennerberg.com
Mon, 26 Oct 2020 19:41:54 -0700
4 files changed,
7 insertions(+),
6 deletions(-)
M
flounder.toml
→
flounder.toml
@@ -2,10 +2,10 @@ # Used in HTML templates and titles
SiteTitle="🐟flounder" # Include port if running locally -Host="localhost:8080" +Host="localhost:8165" # Set this depending on whether you want to run this service standalone or through a reverse proxy server -HttpPort="8443" +HttpPort=8165 HttpsEnabled=false # Folder containing subfolders for each user's files
M
http.go
→
http.go
@@ -3,6 +3,7 @@
import ( "bytes" "database/sql" + "fmt" gmi "git.sr.ht/~adnano/go-gemini" "github.com/gorilla/handlers" "github.com/gorilla/sessions"@@ -367,7 +368,7 @@ }
} func runHTTPServer() { - log.Printf("Running http server on %s", c.Host) + log.Printf("Running http server with hostname %s on port %d. TLS enabled: %t", c.Host, c.HttpPort, c.HttpsEnabled) var err error t, err = template.ParseGlob(path.Join(c.TemplatesDirectory, "*.html")) if err != nil {@@ -399,7 +400,7 @@ srv := &http.Server{
ReadTimeout: 5 * time.Second, WriteTimeout: 10 * time.Second, IdleTimeout: 120 * time.Second, - Addr: ":" + port, + Addr: fmt.Sprintf(":%d", port), // TLSConfig: tlsConfig, Handler: wrapped, }
M
templates/index.gmi
→
templates/index.gmi
@@ -11,5 +11,5 @@ {{range .Users}}=> gemini://{{.}}.{{$host}}
{{end}} ## Recently updated files: -{{range .Files}}=> gemini://{{.Creator}}.{{$host}}/{{.Name}} {{.Name}} ({{.UpdatedTime}}) +{{range .Files}}=> gemini://{{.Creator}}.{{$host}}/{{.Name}} {{.Creator}}: {{.Name}} ({{.TimeAgo}}) {{end}}