Skip to content

Instantly share code, notes, and snippets.

@cburmeister
Last active August 29, 2015 14:14
Show Gist options
  • Save cburmeister/37eaadc1263098b9d701 to your computer and use it in GitHub Desktop.
Save cburmeister/37eaadc1263098b9d701 to your computer and use it in GitHub Desktop.
Serve a directory over HTTP with go.
package main
import (
"net/http"
)
func main() {
fs := http.FileServer(http.Dir("static"))
http.Handle("/", fs)
http.ListenAndServe(":3000", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment