Created
January 6, 2014 01:59
-
-
Save mattetti/8277017 to your computer and use it in GitHub Desktop.
Static web server in Go that can be cross compiled for Windows, Linux, Mac etc.. Content available in the public folder will be served automatically.
This file contains 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("public"))) | |
log.Println("About to start the server on port 8014") | |
http.ListenAndServe(":8014", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment