Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.87 KB

README.md

File metadata and controls

65 lines (46 loc) · 1.87 KB
Arcjet Logo

Arcjet dynamic rate limit example

Arcjet helps developers protect their apps in just a few lines of code. This is an example application demonstrating the use of dynamic rate limits with user configuration in a database.

This is forked from the main Arcjet example app.

Video walkthrough

Watch the video walkthrough of this example on YouTube.

Features

  • Rate limiting shows the use of different rate limit configurations depending on the authenticated user.
  • Dynamic rate limits using the value set in a SQLite database for each user.

Run locally

  1. Register for a free Arcjet account.

  2. Install dependencies:

npm ci
  1. Rename .env.example to .env and add your Arcjet key. Add an Auth.js secret and create a GitHub OAuth app.

  2. Bootstrap the database:

npm exec prisma migrate dev
  1. Start the dev server
npm run dev
  1. Open http://localhost:3000 in your browser.

Stack