Compare commits
No commits in common. "51f1f6bc35eb63887529479caa2dabef2c2945d0" and "88ff388a79c0ac68d4f24597c5f87e2ac26368ee" have entirely different histories.
51f1f6bc35
...
88ff388a79
|
@ -3,7 +3,6 @@
|
|||
Code for the [burning.moe](https://burning.moe) homepage
|
||||
|
||||
## technologies used
|
||||
|
||||
- written in [go](https://go.dev) using:
|
||||
- [chi](https://github.com/go-chi/chi)
|
||||
- [cleanenv](https://github.com/ilyakaznacheev/cleanenv)
|
||||
|
@ -17,4 +16,6 @@ Code for the [burning.moe](https://burning.moe) homepage
|
|||
|
||||
why not?
|
||||
|
||||
Improving my go skills, and learning to write web apps in go, was a good opportunity to rewrite my ancient and basic website while having it functionally not change at all.
|
||||
Improving my go skills, and learning to write web apps in go, was a
|
||||
good opportunity to rewrite my ancient and basic website while having
|
||||
it functionally not change at all.
|
||||
|
|
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/arl/statsviz"
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
||||
"git.burning.moe/celediel/burning.moe/internal/config"
|
||||
|
@ -20,21 +19,10 @@ func routes(app *config.AppConfig) http.Handler {
|
|||
mux.Use(mw)
|
||||
}
|
||||
|
||||
// Setup stats viewer
|
||||
stats, _ := statsviz.NewServer()
|
||||
mux.Get("/debug/statsviz/ws", stats.Ws())
|
||||
mux.Get("/debug/statsviz", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "/debug/statsviz/", 301)
|
||||
})
|
||||
mux.Handle("/debug/statsviz/*", stats.Index())
|
||||
|
||||
// Setup static file server
|
||||
app.Logger.Debug("Setting up /static file server")
|
||||
mux.Handle("/static/*", http.StripPrefix("/static", http.FileServer(http.Dir("./static"))))
|
||||
|
||||
// handle certbot challenge
|
||||
mux.Handle("/.well-known/acme-challenge/*", http.StripPrefix("/.well-known/acme-challenge", http.FileServer(http.Dir("./.well-known/acme-challenge"))))
|
||||
|
||||
// Setup routes for handlers
|
||||
for _, handler := range handlers.Handlers {
|
||||
app.Logger.Info("Setting up handler for " + handler.Handles)
|
||||
|
|
2
go.mod
2
go.mod
|
@ -11,11 +11,9 @@ require (
|
|||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
github.com/arl/statsviz v0.6.0 // indirect
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
||||
github.com/charmbracelet/lipgloss v0.10.0 // indirect
|
||||
github.com/go-logfmt/logfmt v0.6.0 // indirect
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/joho/godotenv v1.5.1 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,8 +1,6 @@
|
|||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
|
||||
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/arl/statsviz v0.6.0 h1:jbW1QJkEYQkufd//4NDYRSNBpwJNrdzPahF7ZmoGdyE=
|
||||
github.com/arl/statsviz v0.6.0/go.mod h1:0toboo+YGSUXDaS4g1D5TVS4dXs7S7YYT5J/qnW2h8s=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
|
||||
github.com/charmbracelet/lipgloss v0.10.0 h1:KWeXFSexGcfahHX+54URiZGkBFazf70JNMtwg/AFW3s=
|
||||
|
@ -15,8 +13,6 @@ github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
|
|||
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
|
||||
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/ilyakaznacheev/cleanenv v1.5.0 h1:0VNZXggJE2OYdXE87bfSSwGxeiGt9moSR2lOrsHHvr4=
|
||||
github.com/ilyakaznacheev/cleanenv v1.5.0/go.mod h1:a5aDzaJrLCQZsazHol1w8InnDcOX0OColm64SlIi6gk=
|
||||
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||
|
|
|
@ -18,17 +18,10 @@ LinkMap:
|
|||
- href: https://git.burning.moe/celediel/qud-mods
|
||||
text: assorted mods for Caves of Qud
|
||||
icon: teenyicons:c-sharp-solid
|
||||
go:
|
||||
misc:
|
||||
- href: https://git.burning.moe/celediel/burning.moe
|
||||
text: burning.moe - this website
|
||||
icon: file-icons:go-old
|
||||
- href: https://git.burning.moe/celediel/gt
|
||||
text: gt - small cli for XDG trash specification
|
||||
icon: file-icons:go-old
|
||||
- href: https://git.burning.moe/celediel/agedit
|
||||
text: agedit - edit age encrypted text with $EDITOR
|
||||
icon: file-icons:go-old
|
||||
misc:
|
||||
- href: https://git.burning.moe/celediel/poiekolon.nvim
|
||||
text: poiekolon.nvim - neovim plugin to add or toggle a char at the end of a line
|
||||
icon: simple-icons:lua
|
||||
|
|
Loading…
Reference in a new issue