Skip to content

Instantly share code, notes, and snippets.

@enmanuelr
Created April 5, 2013 17:14
Show Gist options
  • Save enmanuelr/5320986 to your computer and use it in GitHub Desktop.
Save enmanuelr/5320986 to your computer and use it in GitHub Desktop.
Trying to serve static content with golang
package main
import (
"net/http"
)
func main() {
http.Handle("/static/", http.FileServer(http.Dir("/some/dir/with/static/content")))
http.ListenAndServe(":8081", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment