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.
Watch the video walkthrough of this example on YouTube.
- 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.
-
Install dependencies:
npm ci
-
Rename
.env.example
to.env
and add your Arcjet key. Add an Auth.js secret and create a GitHub OAuth app. -
Bootstrap the database:
npm exec prisma migrate dev
- Start the dev server
npm run dev
- Open http://localhost:3000 in your browser.