Created
April 11, 2012 18:23
-
-
Save nstanke/2361144 to your computer and use it in GitHub Desktop.
Simple Golang weberserver
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 ( | |
"net/http" | |
"log" | |
) | |
func main() { | |
err := http.ListenAndServe("", http.FileServer(http.Dir("/var/www/go"))) | |
if err != nil { | |
log.Printf("Error: %v", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment