restructuring

This commit is contained in:
2024-12-27 03:25:44 +01:00
parent a711e5742d
commit ab1b709c77
5 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
package main
import (
"fmt"
"net/http"
"crowsnest-frontend/internal/model"
)
func test(w http.ResponseWriter, req *http.Request) {
for name, headers := range req.Header {
for _, h := range headers {
fmt.Fprintf(w, "%v: %v\n", name, h)
}
}
}
func main() {
http.HandleFunc("/test", test)
// Serve files from the "static" directory
fs := http.FileServer(http.Dir("./static"))
http.Handle("/", http.StripPrefix("/", fs))
a := &model.Article{}
fmt.Println(a.Hash())
//http.ListenAndServe(":8090", nil)
}