Skip to content

Instantly share code, notes, and snippets.

@nstanke
Created April 11, 2012 18:23
Show Gist options
  • Save nstanke/2361144 to your computer and use it in GitHub Desktop.
Save nstanke/2361144 to your computer and use it in GitHub Desktop.
Simple Golang weberserver
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