Created
September 13, 2019 05:49
-
-
Save just1689/1622360975a0d18a76b0a50e52d43b9e 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 ( | |
| "net/http" | |
| "os" | |
| ) | |
| func main() { | |
| http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { | |
| http.ServeFile(w,r, r.URL.RequestURI()[1:]) | |
| }) | |
| panic(http.ListenAndServe(os.Getenv("listenAddr"), nil)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment