golang一句话web服务器

备忘,有时候需要用

package main

import (
	"net/http"
)

func main() {
	http.Handle("/", http.FileServer(http.Dir(".")))
	_ = http.ListenAndServe(":9999", nil)
}
posted @ 2022-12-07 10:01  自由出土文物  阅读(24)  评论(0编辑  收藏  举报