Deploy ONE on Cloudflare

Advantages of Cloudflare

  • Global CDN for fast content delivery
  • DDoS protection and security features
  • Easy integration with Git repositories
  • Automatic HTTPS and SSL certificate management
  • Serverless computing with Cloudflare Workers

Deployment Tutorial

  1. Sign up for a Cloudflare account at https://dash.cloudflare.com/sign-up
  2. Install the Cloudflare CLI tool: npm install -g wrangler
  3. Authenticate with Cloudflare: wrangler login
  4. Create a wrangler.toml file in your project root
  5. Configure your wrangler.toml file (see example below)
  6. Build your project: npm run build
  7. Deploy to Cloudflare: wrangler publish

Example wrangler.toml

					name = "one-app"
type = "webpack"
account_id = "your-account-id"
workers_dev = true
route = ""
zone_id = ""
usage_model = "bundled"
compatibility_date = "2023-05-18"

[site]
bucket = "./build"
entry-point = "workers-site"
				

Cloudflare Pricing

Cloudflare offers a generous free tier, which is suitable for many small to medium-sized projects. For larger applications, they have paid plans with additional features and resources.

  • Free Plan: 100,000 requests per day, 10ms CPU time per request
  • Pro Plan: $5/month for 10 million requests, 50ms CPU time per request
  • Business Plan: Custom pricing for enterprise-level needs

For the most up-to-date pricing information, please visit the Cloudflare Pricing Page.