Skip to content
/ example-expressjs Public template

An example Express.js site protected by Arcjet bot detection, rate limiting, and Shield WAF.

License

Notifications You must be signed in to change notification settings

arcjet/example-expressjs

Repository files navigation

Arcjet Logo

Arcjet example: Express.js

Arcjet helps developers protect their apps in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.

This is an example Express.js application demonstrating how to protect a website from abuse.

Features

  • Bot protection shows how the site can be protected from automated clients.
  • Rate limiting shows a rate limit configuration that limits the number of requests from a single IP.
  • Attack protection demonstrates Arcjet Shield, which detects suspicious behavior, such as SQL injection and cross-site scripting attacks.

Run locally

  1. Register for a free Arcjet account.

  2. Install dependencies:

npm ci
  1. Rename .env.local.example to .env.local and add your Arcjet key.

  2. Start the dev server

npm run start
  1. Open http://localhost:3000 in your browser.

Need help?

Check out the docs, contact support, or join our Discord server.

Contributors 3

  •  
  •  
  •