Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/donatello/wai-rate-limit-postgres
See README for more info
https://github.com/donatello/wai-rate-limit-postgres
Last synced: 25 days 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 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-04T00:07:18.000Z (over 1 year ago)
- Last Synced: 2024-09-27T01:04:51.717Z (about 1 month ago)
- Language: Haskell
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 3
- 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
[![GitHub CI](https://github.com/donatello/wai-rate-limit-postgres/workflows/CI/badge.svg)](https://github.com/donatello/wai-rate-limit-postgres/actions)
[![Hackage](https://img.shields.io/hackage/v/wai-rate-limit-postgres.svg?logo=haskell)](https://hackage.haskell.org/package/wai-rate-limit-postgres)
[![Apache-2.0 license](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](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
```