nidr 发表于 2018-10-20 14:01:32

golang http_file_server

package main  

  
import (
  
    "net/http"
  
)
  

  
func main() {
  
    http.Handle(
  
      "/assets/",
  
      http.StripPrefix("/assets/", http.FileServer(http.Dir("e:/"))),
  
    )
  
    http.ListenAndServe(":8080", nil)
  
}


页: [1]
查看完整版本: golang http_file_server