Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1 KB

README.md

File metadata and controls

38 lines (27 loc) · 1 KB
Arcjet Logo

Arcjet Rate Limit with Bun.sh

This example shows how to use Arcjet with a Bun.sh server.

How to use

  1. From the root of the project, install the SDK dependencies.

    npm ci
  2. Enter this directory and install the example's dependencies.

    cd examples/bun-rate-limit
    bun install
  3. Rename .env.local.example to .env.local and add your Arcjet key.

  4. Start the server.

    bun run --hot index.ts
  5. Visit http://localhost:3000/. Note: If you load this in a browser, you will see 2 requests - one for the page and one for a favicon.

  6. Refresh the page to trigger the rate limit.