Create a quick http file server with GO LANG

#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)
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章