Created
September 25, 2019 01:20
-
-
Save brydavis/502f92731d386ec1caafb9376742f705 to your computer and use it in GitHub Desktop.
Basic Root Folder File / Webserver for Static Site Testing
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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.Handle("/", http.FileServer(http.Dir("."))) | |
log.Printf("Serving %s on HTTP port: %s\n", ".", "8080") | |
http.ListenAndServe(":8080", nil) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment