serve README.md on /

This commit is contained in:
DataHoarder 2022-02-19 04:05:49 +01:00
parent e575e1d9c4
commit 43afb92ba5

View file

@ -385,6 +385,9 @@ func main() {
} else {
filePath := path.Join(*servePath, strings.TrimLeft(request.URL.Path, "/"))
if request.URL.Path == "/" {
filePath = path.Join(*servePath, "README.md")
}
stat, err := os.Stat(filePath)
if err != nil {