Skip to content

Instantly share code, notes, and snippets.

@dvliman
Created September 5, 2013 15:49
Show Gist options
  • Save dvliman/6452030 to your computer and use it in GitHub Desktop.
Save dvliman/6452030 to your computer and use it in GitHub Desktop.
static file server
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