debuggingfuture / workers-react-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudflare GraphQL Gateway

Workers React Example

Combining the power of Cloudflare Workers and React will allow you to render the same React code you would on the browser on Cloudflare Workers.

Dependencies

Instructions

  • yarn preview

Terraform

If you'd like to use terraform to upload your worker scripts, you'll need a vars file with the following variables

# Cloudflare variables
variable "cloudflare_email" {
  default = "dmr@bell-labs.com"
}

variable "cloudflare_token" {
  default = "00000000000000000000000000"
}

# GCP exmaple variables
variable "project" {
  default = "my-project"
}

variable "zone" {
  default = "buzzwords.app"
}

variable "bucket" {
  default = "buzzwords"
}

after adding this file as vars.tf (terraform will pickup any .tf extension file) do terraform init and terraform apply

About

Cloudflare Workers allow you to write JavaScript which runs on all of Cloudflare's 150+ global data centers.

React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes.

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 94.7%Language:HCL 5.3%