tstor/webdav/http.go
Antonio Navarro Perez 2a38efbb03
Several torrents per filesystem (#38)
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-03-06 23:08:15 +01:00

14 lines
358 B
Go

package webdav
import (
"fmt"
"net/http"
"github.com/distribyted/distribyted/fs"
"github.com/sirupsen/logrus"
)
func NewWebDAVServer(fss map[string]fs.Filesystem, port int) error {
logrus.WithField("host", fmt.Sprintf("0.0.0.0:%d", port)).Info("starting webDAV server")
return http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", port), newHandler(fss))
}