Platforms

Alchemy and Cloudflare

A guide to setting up a Cloudflare Workers development environment with Alchemy.

Prepare the example

Install the current Node.js LTS and Vite+.

vp create effront -- my-app --platform alchemy-cloudflare
cd my-app
vp install

Find the application and resource definitions

The one-page example already contains the host configuration:

FileRole
src/entry.effront.tsxDefines the document layout, one page, and its / route.
src/entry.workers.tsDeclares the Worker and defers loading the application until a request.
alchemy.run.tsDefines the Stack and outputs the Worker's URL.
vite.config.tsRegisters effront() and effrontAlchemy().
package.jsonDefines dev as alchemy dev.

Start development

From the generated project, run:

vp run dev

When ready, open the local URL printed by Alchemy. The single page displays Hello, world. Change <h1>Hello, world</h1> in src/entry.effront.tsx to <h1>Hello, Effront!</h1> and save.

Add resources when needed

For application services using resources such as KV and D1, follow Alchemy Basic, Alchemy's resource APIs, and the Effront Alchemy API reference.