Last active
August 29, 2015 14:14
-
-
Save cburmeister/37eaadc1263098b9d701 to your computer and use it in GitHub Desktop.
Serve a directory over HTTP with go.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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