diff --git a/cmd/main.go b/cmd/main.go new file mode 100644 index 0000000..d3e8eff --- /dev/null +++ b/cmd/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "fmt" + "net/http" +) + +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)) + + + http.ListenAndServe(":8090", nil) +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..bf50988 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module frontend + +go 1.23.3 diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..16da73d --- /dev/null +++ b/static/index.html @@ -0,0 +1,75 @@ + + + +
+ + +This is a short preview of the article content. It provides a quick summary to entice readers to click and read more.
+ Read More +This is another preview of an article. It gives a brief overview to encourage users to explore further.
+ Read More +A concise description of the article to pique interest and direct readers to the full content.
+ Read More +