Created
September 5, 2013 15:49
-
-
Save dvliman/6452030 to your computer and use it in GitHub Desktop.
static file server
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" | |
import "log" | |
func main() { | |
http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("/")))) | |
if err := http.ListenAndServe(":9090", nil); err != nil { | |
log.Fatal("ListenAndServe: ", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment