feat: add app code

- journal domain package
- httpserver package
- html templates
- main.go in root dir
This commit is contained in:
Vojtěch Mareš 2025-04-22 22:01:53 +02:00
parent 3cc4d28aac
commit 943922a6e1
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
20 changed files with 1032 additions and 0 deletions

18
httpserver/favicon.go Normal file
View file

@ -0,0 +1,18 @@
package httpserver
import "net/http"
type Favicon struct {
favicon []byte
}
func NewFavicon(favicon []byte) *Favicon {
return &Favicon{
favicon: favicon,
}
}
func (f *Favicon) FaviconHandler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "image/x-icon")
w.Write(f.favicon)
}