From 05192d2e3d2f9340a183d6ff6676f18488c8fbb0 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Mon, 3 Oct 2022 18:19:22 +0200 Subject: [PATCH] add dns as a submodule Signed-off-by: Sam Therapy --- .gitignore | 23 +++++++++++++++++++++++ .gitmodules | 3 +++ Caddyfile.example | 7 +++++++ README.md | 20 +++++++++++--------- go.mod | 2 +- go.sum | 2 ++ main.go | 2 ++ root/sites/dns.froth.zone | 1 + 8 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 Caddyfile.example create mode 160000 root/sites/dns.froth.zone diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfc20be --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work + +.dccache \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2823926 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "root/sites/dns.froth.zone"] + path = root/sites/dns.froth.zone + url = ../dns.froth.zone.git diff --git a/Caddyfile.example b/Caddyfile.example new file mode 100644 index 0000000..6733b30 --- /dev/null +++ b/Caddyfile.example @@ -0,0 +1,7 @@ +example.com { + header ?Cache-Control "max-age=3600" + encode gzip + respond /robots.txt "User-agent: * +Disallow: " 200 + reverse_proxy localhost:8080 +} \ No newline at end of file diff --git a/README.md b/README.md index 98f934f..31c0241 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,19 @@ # GOWERC -clone of http://werc.cat-v.org/ in go. +clone of in go. ## features -* virtual hosting -* render markdown, html, plain text -* serve files -* read content from zip file + +- virtual hosting +- render markdown, html, plain text +- serve files +- read content from zip file ## building ### with go install - go install git.froth.zone/sam/go2werc@latest + go install git.froth.zone/sam/go2werc@latest ## License -Werc was originally put into the public domain. Since the public domain isn't a thing -outside of the US, 0BSD is used instead. It's basically the public domain but the EU -actually recognizes it. \ No newline at end of file + +Werc was originally put into the public domain. Since the public domain isn't a +thing outside of the US, 0BSD is used instead. It's basically the public domain +but the EU actually recognizes it. diff --git a/go.mod b/go.mod index f008014..94212c5 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.18 require ( github.com/russross/blackfriday/v2 v2.1.0 - golang.org/x/tools v0.1.11 + golang.org/x/tools v0.1.12 ) diff --git a/go.sum b/go.sum index 67ad0d8..9a81611 100644 --- a/go.sum +++ b/go.sum @@ -2,3 +2,5 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/main.go b/main.go index 0950003..a9b5e90 100644 --- a/main.go +++ b/main.go @@ -476,5 +476,7 @@ func main() { TLSConfig: tlsconf, } + fmt.Println("Listening on", *listen) + log.Fatal(s.Serve(listener)) } diff --git a/root/sites/dns.froth.zone b/root/sites/dns.froth.zone new file mode 160000 index 0000000..bb4da3e --- /dev/null +++ b/root/sites/dns.froth.zone @@ -0,0 +1 @@ +Subproject commit bb4da3e4553d63538af417792b3f384d6a505a88