Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,24 @@ jobs:
matrix:
example:
- astro
- bun
- deno
- express-newman
- expressjs
- fastapi
- fastify
- firebase-functions
- flask
- nestjs
- nextjs
- nextjs-bot-categories
- nextjs-bot-protection
- nextjs-fly
- nextjs-form
- nextjs-server-action
- nuxt
- react-router
- react-router-middleware
- sveltekit
- tanstack-start
steps:
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ frameworks.

- [Astro example](https://github.com/arcjet/example-astro)
([`./examples/astro`](./examples/astro))
- [Bun example](https://github.com/arcjet/example-bun)
([`./examples/bun`](./examples/bun))
- [Deno example](https://github.com/arcjet/example-deno)
([`./examples/deno`](./examples/deno))
- [Express.js example](https://github.com/arcjet/example-expressjs)
Expand All @@ -39,19 +41,35 @@ frameworks.

### Use cases

- [Express.js with Newman tests example](https://github.com/arcjet/example-express-newman)
([`./examples/express-newman`](./examples/express-newman))
- [Firebase functions example](https://github.com/arcjet/example-firebase-functions)
([`./examples/firebase-functions`](./examples/firebase-functions))
- [Next.js AI agent guardrails example](https://github.com/arcjet/example-nextjs-ai-agent)
([`./examples/nextjs-ai-agent`](./examples/nextjs-ai-agent))
- [Next.js bot categories example](https://github.com/arcjet/example-nextjs-bot-categories)
([`./examples/nextjs-bot-categories`](./examples/nextjs-bot-categories))
- [Next.js bot protection example](https://github.com/arcjet/example-nextjs-bot-protection)
([`./examples/nextjs-bot-protection`](./examples/nextjs-bot-protection))
- [Next.js deployed to Fly.io example](https://github.com/arcjet/example-nextjs-fly)
([`./examples/nextjs-fly`](./examples/nextjs-fly))
- [Next.js form example](https://github.com/arcjet/example-nextjs-form)
([`./examples/nextjs-form`](./examples/nextjs-form))
- [Next.js server action example](./examples/nextjs-server-action)
- [Next.js Guard policy example](https://github.com/arcjet/example-nextjs-guard-policy)
([`./examples/nextjs-guard-policy`](./examples/nextjs-guard-policy))
- [Next.js sensitive information example](https://github.com/arcjet/example-nextjs-sensitive-info)
([`./examples/nextjs-sensitive-info`](./examples/nextjs-sensitive-info))
- [Next.js server action example](https://github.com/arcjet/example-nextjs-server-action)
([`./examples/nextjs-server-action`](./examples/nextjs-server-action))
- [Node.js Guard policy example](https://github.com/arcjet/example-node-guard-policy)
([`./examples/node-guard-policy`](./examples/node-guard-policy))
- [React Router middleware example](https://github.com/arcjet/example-react-router-middleware)
([`./examples/react-router-middleware`](./examples/react-router-middleware))
- [Vercel Eve agent example](https://github.com/arcjet/example-eve-agent)
([`./examples/eve-agent`](./examples/eve-agent))

Can't find what you're looking for? Try the [`examples` directory of the
`arcjet/arcjet-js` repository](https://github.com/arcjet/arcjet-js/tree/main/examples).
Can't find what you're looking for? Check out [the Arcjet
docs](https://docs.arcjet.com/) for more integrations and guides.

## Contributing

Expand Down
4 changes: 4 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
include:
- examples/astro/compose.yaml
- examples/bun/compose.yaml
- examples/deno/compose.yaml
- examples/express-newman/compose.yaml
- examples/expressjs/compose.yaml
- examples/fastapi/compose.yaml
- examples/fastify/compose.yaml
- examples/firebase-functions/compose.yaml
- examples/flask/compose.yaml
- examples/nestjs/compose.yaml
- examples/nextjs-bot-categories/compose.yaml
- examples/nextjs-bot-protection/compose.yaml
- examples/nextjs-fly/compose.yaml
- examples/nextjs-form/compose.yaml
- examples/nextjs-server-action/compose.yaml
- examples/nextjs/compose.yaml
- examples/nuxt/compose.yaml
- examples/react-router/compose.yaml
- examples/react-router-middleware/compose.yaml
- examples/sveltekit/compose.yaml
- examples/tanstack-start/compose.yaml
6 changes: 6 additions & 0 deletions examples/bun/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM mcr.microsoft.com/devcontainers/base:bookworm

ENV BUN_INSTALL=/usr/local
RUN curl -fsSL https://bun.sh/install | bash

RUN bun --version
13 changes: 13 additions & 0 deletions examples/bun/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Arcjet example for Bun",
"build": { "dockerfile": "Dockerfile" },
"features": {
"ghcr.io/trunk-io/devcontainer-feature/trunk:1": {}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": ["oven.bun-vscode", "trunk.io"]
}
}
}
4 changes: 4 additions & 0 deletions examples/bun/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!package.json
!src
!tsconfig.json
141 changes: 141 additions & 0 deletions examples/bun/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist
.output

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/
12 changes: 12 additions & 0 deletions examples/bun/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM oven/bun:1

WORKDIR /app

EXPOSE 3000

COPY package.json ./
RUN bun install

COPY . .

CMD ["bun", "run", "start"]
Loading
Loading