Local Test Workflow

How we work during testing: GitHub updates often, Cloudflare only when you say so.

Your flow

StepWhat happens
1. Apply changesCode edits + merge to main on GitHub
2. GitHub PagesGame site auto-updates (free) — optional for quick look
3. Cloudflare APIDoes NOT auto-deploy — you run deploy manually when ready
4. Test locallyDownload ZIP → run local server → play on your PC

Download ZIP (easiest)

After changes are on main:

https://github.com/jericddd/MonEx/archive/refs/heads/main.zip

Or: GitHub repo → CodeDownload ZIP

Or: GitHub → ActionsPackage test ZIPRun workflow → download artifact (no node_modules).

Run locally (Windows)

cd path\to\MonEx-main\x-bot
npm install
npm run server

Open in browser:

http://localhost:3001/home.html
http://localhost:3001/monanimal_game.html

Local server uses the same API routes as Cloudflare. For cloud API instead, set js/monex-config.js to your Worker URL.

Deploy Cloudflare (only when you want)

When you are ready to push API changes live:

  1. GitHub → Actions
  2. Deploy Cloudflare API
  3. Run workflow → branch main

Or on your PC:

cd cloudflare\monex-api
npx wrangler deploy

What auto-updates vs manual

TargetOn push to main
GitHub Pages (game HTML/JS)✅ Auto
Cloudflare Worker (API)❌ Manual only

← Back to Home · Cloudflare setup