Created
September 15, 2012 09:28
-
-
Save wendal/3727110 to your computer and use it in GitHub Desktop.
简单演示go通过http服务静态文件
This file contains hidden or 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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
log.Fatal(http.ListenAndServe(":8080", http.FileServer(http.Dir("/tmp")))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment