Environment Variables

Configuring environment variables

Environment Variables

Local Development

Create .dev.vars file:

JWT_SECRET=your-secret-key-here
DB=database-id-here

Production

Set in Cloudflare dashboard or wrangler.toml:

[env.production.vars]
JWT_SECRET = "your-secret-key"

Required Variables

  • JWT_SECRET - Secret for JWT tokens
  • DB - D1 database binding name

Next Steps