reflare-template is a minimal template to kickstart a worker with Reflare and TypeScript.
- Generate a new project from reflare-template and install the dependencies, which include
reflare,wrangler,typescript, and@cloudflare/workers-types.
npm init cloudflare reflare-app https://github.com/xiaoyang-sde/reflare-template
cd reflare-app
npm install- Authenticate
wranglerwith a Cloudflare account.
npx wrangler login-
Edit or add route definitions in
src/index.ts. Please refer to the documentation of Reflare. -
Run
npm run devto preview Reflare with a local development server. -
Run
npm run publishto publish Reflare on Cloudflare Workers.
