Skip to content

Instantly share code, notes, and snippets.

@nibalizer
Created April 22, 2014 00:05
Show Gist options
  • Select an option

  • Save nibalizer/11160786 to your computer and use it in GitHub Desktop.

Select an option

Save nibalizer/11160786 to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
)
func main() {
http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("www-root"))))
if err := http.ListenAndServe(":8080", 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