tstor/webdav/http.go
Antonio Navarro Perez 3b87e4aad7
Move from logrus to zerolog. (#45)
Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
2021-03-10 10:54:56 +01:00

14 lines
354 B
Go

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