https://github.com/donatello/wai-rate-limit-postgres
See README for more info
https://github.com/donatello/wai-rate-limit-postgres
Last synced: 3 months ago
JSON representation
See README for more info
- Host: GitHub
- URL: https://github.com/donatello/wai-rate-limit-postgres
- Owner: donatello
- License: apache-2.0
- Created: 2022-02-11T20:16:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T00:07:18.000Z (over 2 years ago)
- Last Synced: 2025-03-24T21:14:05.072Z (3 months ago)
- Language: Haskell
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# wai-rate-limit-postgres
[](https://github.com/donatello/wai-rate-limit-postgres/actions)
[](https://hackage.haskell.org/package/wai-rate-limit-postgres)
[](LICENSE)This is a companion package to [wai-rate-limit](https://github.com/mbg/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:
```shell
$ 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:
```shell
$ export PG_DB_URI=postgres://postgres:postgres@localhost:5432/postgres
$ cabal test
```