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/来访问
}
上一篇下一篇

猜你喜欢

热点阅读