2021-03-01 18:04:59 +00:00
|
|
|
package webdav
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/distribyted/distribyted/fs"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
|
|
)
|
|
|
|
|
2021-03-06 22:08:15 +00:00
|
|
|
func NewWebDAVServer(fss map[string]fs.Filesystem, port int) error {
|
2021-03-01 18:04:59 +00:00
|
|
|
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))
|
|
|
|
}
|