@hackage wai-rate-limit-postgres0.6.0.0

See README for more info

wai-rate-limit-postgres

GitHub CI Hackage Apache-2.0 license

This is a companion package to wai-rate-limit that adds support to use PostgreSQL as a backend.

Depending on traffic and latency of PostgreSQL, this backend may or may not be appropriate for you.

Testing locally with Docker

Start a PostgreSQL docker container in a terminal:


$ docker run --name some-postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -it --rm postgres -c log_statement=all

Run tests in another terminal with:


$ export PG_DB_URI=postgres://postgres:postgres@localhost:5432/postgres
$ cabal test