Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(examples): Expanded AI example with rate limit by user ID #221

Merged
merged 8 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/nextjs-13-pages-wrap/.env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ARCJET_KEY=
6 changes: 1 addition & 5 deletions examples/nextjs-13-pages-wrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ Route](https://nextjs.org/docs/pages/building-your-application/routing/api-route
npm ci
```

3. Add your Arcjet key to `.env.local`

```env
ARCJET_KEY=
```
3. Rename `.env.local.example` to `.env.local` and add your Arcjet key.

4. Start the dev server.

Expand Down
5 changes: 5 additions & 0 deletions examples/nextjs-13-pages-wrap/environment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare namespace NodeJS {
export interface ProcessEnv {
readonly ARCJET_KEY: string;
}
}
5 changes: 4 additions & 1 deletion examples/nextjs-13-pages-wrap/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
// Disabled due to errors when building. See
// https://nextjs.org/docs/messages/failed-loading-swc
swcMinify: false,
}

module.exports = nextConfig
module.exports = nextConfig
Loading
Loading