您的位置:首页 > 理论基础 > 计算机网络

Create a quick http file server with GO LANG

2014-05-28 16:13 549 查看
#cat httpsfile.go
package main
import "net/http"
func main(){
h := http.FileServer(http.Dir("."))
//this is https form
//http.ListenAndServeTLS(":8001", "rui.crt", "rui.key", h)
//normal http, port is 8001
http.ListenAndServe(":8001", h)
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: