Created
October 6, 2022 15:43
-
-
Save eyberg/a772703ee4651f289099cc491d13258b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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