Skip to content

Instantly share code, notes, and snippets.

@eyberg
Created October 6, 2022 15:43
Show Gist options
  • Save eyberg/a772703ee4651f289099cc491d13258b to your computer and use it in GitHub Desktop.
Save eyberg/a772703ee4651f289099cc491d13258b to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"net/http"
)
func main() {
fmt.Println("just a test")
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Println("log")
fmt.Fprintf(w, "Welcome to my website!")
})
fs := http.FileServer(http.Dir("static/"))
http.Handle("/static/", http.StripPrefix("/static/", fs))
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment