Simple Express APP set up using express-generator as an example for using rate-limit-postgresql
-
Generate an environment file. Easiest option would be to run
cp .env.example .env
-
Run
docker compose up -d
-
Access
http://localhost:3005/users-agg
for testingPostgresStore
(aggregated store, used by default). You will be able to see the state of the rate limiting table by running
docker compose exec db psql --user user database -c "select * from rate_limit.aggregated_records;"
- Access
http://localhost:3005/users-ind
for testingPostgresStoreIndividualIP
. You will be able to see the state of the rate limiting table by running
docker compose exec db psql --user user database -c "select * from rate_limit.individual_records;"