How to Deploy everyone-can-use-english to a Server: Complete Cloudflare Workers Guide

Deploy everyone-can-use-english by building the Vite frontend and publishing the Cloudflare Worker using wrangler, with environment configuration in wrangler.toml.

The everyone-can-use-english repository by ZuodaoTech is an AI-assisted English learning application structured as a monorepo with a Vite frontend and a Cloudflare Workers entry point. According to the source code, deployment requires compiling static assets, configuring routing and service bindings, and pushing the Worker script to Cloudflare's edge network.

Prerequisites

Before starting, ensure your server or local machine has:

  • Node.js ≥ 18
  • Yarn 4 (Berry)
  • Cloudflare Wrangler CLI
  • Git

# Ubuntu/Debian example

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs git
npm i -g yarn@4 @cloudflare/wrangler

The repository uses a yarn.lock file, so Yarn will install exact dependency versions automatically.

Clone and Install Dependencies

git clone https://github.com/ZuodaoTech/everyone-can-use-english.git
cd everyone-can-use-english
yarn install

The monorepo structure places the frontend code in enjoy/ and the Worker entry point in entry/. Running yarn install from the root populates node_modules/ for both workspaces.

Build the Vite Frontend

Create the production static assets before deploying:

yarn workspace enjoy build

This command executes Vite using enjoy/vite.main.config.ts, outputting optimized files to enjoy/dist/. The Worker script at entry/index.js serves these files by reading import.meta.env.BASE_URL at runtime.

Key configuration file: [enjoy/vite.main.config.ts](https://github.com/ZuodaoTech/everyone-can-use-english/blob/main/enjoy/vite.main.config.ts)

Configure the Cloudflare Worker

Edit entry/wrangler.toml to match your deployment environment:

name = "1000h-entry"
main = "index.js"
workers_dev = false
compatibility_date = "2023-03-23"

routes = ["1000h.org/*"]
services = [
  { binding = "vtp", service = "1000h-vtp" },
  { binding = "portal", service = "1000h-portal" },
]

[vars]
HOST = "https://1000h.org"

Required adjustments for custom domains:

Setting Change to
routes Your domain pattern, e.g., yourdomain.com/*
HOST Your public URL, e.g., https://yourdomain.com
services Your backend service names (if not using 1000h-vtp/1000h-portal)

The entry/index.js script consumes these variables when routing requests and proxying to auxiliary services.

Key configuration file: [entry/wrangler.toml](https://github.com/ZuodaoTech/everyone-can-use-english/blob/main/entry/wrangler.toml)

Authenticate to Cloudflare

wrangler login

This opens a browser for OAuth authorization. Alternatively, use an API token:

wrangler config --api-token <TOKEN>

Required token permission: "Account Workers Scripts Edit"

Deploy with Wrangler

From the project root (where wrangler.toml resides):

wrangler deploy

Wrangler bundles the enjoy/dist/ assets with the Worker script and publishes to your configured routes. The deploy completes in seconds due to Cloudflare's edge distribution.

Optional: Enable Continuous Deployment

The repository includes GitHub Actions workflows for automated deployment. Relevant workflows:

Workflow File Purpose
Deploy 1000h website .github/workflows/deploy-1000h.yml Runs wrangler deploy on main branch pushes
Test Enjoy App .github/workflows/test-enjoy-app.yml Executes frontend tests
Release Enjoy App .github/workflows/release-enjoy-app.yml Publishes version tags and updates Worker

Required repository secrets for CI/CD:

  • CF_API_TOKEN — Cloudflare API token with Workers edit permission
  • CF_ACCOUNT_ID — Your Cloudflare account ID
  • CF_ZONE_ID — DNS zone ID for your domain

Complete Deployment Script

#!/bin/bash
set -e

# 1. Install prerequisites

sudo apt-get update && sudo apt-get install -y git curl
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
npm i -g yarn@4 @cloudflare/wrangler

# 2. Clone repository

git clone https://github.com/ZuodaoTech/everyone-can-use-english.git
cd everyone-can-use-english

# 3. Install and build

yarn install
yarn workspace enjoy build

# 4. Configure (edit before running)

# nano entry/wrangler.toml

# 5. Deploy

wrangler login
wrangler deploy

echo "Deployment complete. Verify at your configured HOST URL."

Verify the Deployment

Test your live application:

curl -I https://yourdomain.com/

# Expect: HTTP/2 200, content-type: text/html

Confirm the Vite-built UI loads, navigation functions, and API calls to vtp and portal services succeed.

Summary

  • Build first: Run yarn workspace enjoy build to generate static assets in enjoy/dist/
  • Configure routes: Edit entry/wrangler.toml with your domain and backend service bindings
  • Deploy via Wrangler: Use wrangler deploy to publish the Worker and bundled assets to Cloudflare's edge
  • Automate with CI: Fork the repo and enable GitHub Actions with CF_API_TOKEN, CF_ACCOUNT_ID, and CF_ZONE_ID secrets

Frequently Asked Questions

What server infrastructure does everyone-can-use-english require?

The application runs entirely on Cloudflare Workers, a serverless edge platform. No traditional server (VPS, EC2, etc.) is required. The Worker serves static Vite-built assets and proxies API requests to backend services defined in wrangler.toml.

Can I deploy everyone-can-use-english without using Cloudflare?

According to the source code in entry/index.js, the deployment architecture is tightly coupled to Cloudflare Workers for routing, environment variables, and service bindings. Porting to another platform would require rewriting the entry point to handle request routing and asset serving using a different mechanism (e.g., Express, Nginx, or another serverless provider).

How do I update the deployed application after code changes?

Run yarn workspace enjoy build to rebuild the frontend, then wrangler deploy to push updates. If using the GitHub Actions workflow in .github/workflows/deploy-1000h.yml, simply push to the main branch and the deployment triggers automatically.

What are the vtp and portal service bindings in wrangler.toml?

These are Cloudflare Workers service bindings that route internal requests to other Workers in your account. As implemented in entry/index.js, vtp handles voice/text processing and portal provides additional backend functionality. You must create corresponding Workers or remove these bindings if self-hosting without these services.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →