package main
import "net/http"
func main() { fs := http.FileServer(http.Dir("./")) http.Handle("/", http.StripPrefix("/", fs)) http.ListenAndServe(":8000", nil) }
GO编写的简单文件服务器
最新推荐文章于 2024-07-09 20:12:45 发布
package main
import "net/http"
func main() { fs := http.FileServer(http.Dir("./")) http.Handle("/", http.StripPrefix("/", fs)) http.ListenAndServe(":8000", nil) }