Logo
Explore Help
Sign In
tamsin/replication-systems
1
0
Fork 0
You've already forked replication-systems
Code Issues Pull Requests Packages Projects Releases Wiki Activity
replication-systems/cmd/web/handlers.go

16 lines
233 B
Go
Raw Normal View History

bootstrap a go application planning to make this some kind of unhinged microfrontend hotwired mess. this is basically the setup walked through in "Lets Go", but pared down. since we plan to ship this in k8s behind nginx and cert-manager, there's no need to do TLS termination in go. i like httprouter and alice, so i'm including them here early. use `go:embed` to get our templates and static assets (neither of which exist yet) into the binary so we can ship this whole thing to a commodity `go` container.
2024-02-24 21:07:34 -08:00
package main
import (
"net/http"
)
// home ...
func (app *application) home(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
http.NotFound(w, r)
return
}
w.Write([]byte("Hello from replication.systems"))
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.4 Page: 103ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API