Starts a Bandit HTTP server routing to Davy.Plug and blocks until the
process is terminated.
Useful for smoke testing a backend implementation against a real WebDAV
client (macOS Finder, Windows Explorer, cadaver, davfs2, etc.) without
wiring the plug into an application.
Usage
mix davy.serve [options]With no options, serves Davy.Backend.InMemory on 127.0.0.1:4918.
Options
--backend Module— module implementingDavy.Backend(default:Davy.Backend.InMemory). The task callsstart/0on the backend if such a function exists, soDavy.Backend.InMemoryis initialised automatically; other backends may need to be started externally before the task runs.--port N— TCP port to listen on (default:4918).--ip ADDRESS— IP address to bind to. Acceptsloopback(the default),any, or a dotted-quad like0.0.0.0.
Examples
# Zero-config: in-memory backend on http://127.0.0.1:4918
mix davy.serve
# Serve on all interfaces, port 8080
mix davy.serve --ip any --port 8080
# Use a custom backend
mix davy.serve --backend MyApp.DavBackend