# `Slap.Router`
[🔗](https://github.com/mjrusso/slap/blob/slap-v0.7.1/slap/lib/slap/router.ex#L1)

A Plug that serves the Streams and KV HTTP APIs, through
`Slap.Streams.HTTP.Router` and `Slap.KV.HTTP.Router`:

    {Bandit, plug: {Slap.Router, streams: [], kv: []}, port: 4437, ip: :loopback}

`:streams` and `:kv` are those routers' options. A service whose key is
missing or nil is not served. With the default prefixes, Streams are
under `/v1/stream/` and KV under `/v1/kv/`; other paths answer 404.

`GET /health` answers 200. It does not check the services' shards.

It does not authenticate requests; put your own authentication in front.
Without `ip:`, Bandit listens on every interface.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
