mirror of
https://github.com/skidoodle/iphistory.git
synced 2025-02-15 08:29:16 +01:00
chore: Update Dockerfile and main.go for serving web content from the 'web' directory
This commit is contained in:
parent
23d176dcc7
commit
9b9d9ba192
6 changed files with 216 additions and 225 deletions
4
main.go
4
main.go
|
@ -115,9 +115,7 @@ func trackIP(ipChan <-chan string) {
|
|||
}
|
||||
|
||||
func serveWeb() {
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, "index.html")
|
||||
})
|
||||
http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("web"))))
|
||||
|
||||
http.HandleFunc("/history", func(w http.ResponseWriter, r *http.Request) {
|
||||
history, err := readHistory()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue