Skip to content

Latest commit

 

History

History

rate-limit-postgres-cjs

Express Demo for rate-limit-postgresql

Simple Express APP set up using express-generator as an example for using rate-limit-postgresql

Steps for running the demo project

  1. Generate an environment file. Easiest option would be to run cp .env.example .env

  2. Run docker compose up -d

  3. Access http://localhost:3005/users-agg for testing PostgresStore (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;"
  1. Access http://localhost:3005/users-ind for testing PostgresStoreIndividualIP. 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;"