golang一句话web服务器
备忘,有时候需要用
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
_ = http.ListenAndServe(":9999", nil)
}
备忘,有时候需要用
package main
import (
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
_ = http.ListenAndServe(":9999", nil)
}