Created
September 24, 2015 03:49
-
-
Save adkdev/4b4ae39f617cf0592d19 to your computer and use it in GitHub Desktop.
Serve static file with golang
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" | |
"log" | |
) | |
func main() { | |
log.Println("Static server listening on port 5555...") | |
http.ListenAndServe(":5555", http.FileServer(http.Dir("D:/dev/static"))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment