gobyexample-static-content
2018-11-07 本文已影响0人
bocsoft
来源:https://github.com/xg-wang/gobyexample/tree/master/examples
package main
import "net/http"
func main() {
handler := http.FileServer(http.Dir("./"))
http.ListenAndServe(":9090",handler)//可以把项目目录当成WEB应用,通过http://localhost:9090/来访问
}