Skip to content
Public template

About

Cloudflare Template

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Ziex Cloudflare template

Docs · Examples · CLI · Discord · GitHub

Deploy to Cloudflare Workers

Developing

Requirements: Node.js

npm install

Start dev server (http://localhost:8787):

npm run dev

Every Ziex CLI command is available as npx zig build zx -- <command>.

Deploying

npm run deploy

The worker entrypoint is app/main.ts. wrangler.jsonc declares KV and D1 (DB) bindings (auto-provisioned on deploy).

Pre-rendering: pages that look the same for every visitor can be served from Cloudflare's CDN. Mark them with pub const options = zx.PageOptions{ .rendering = .prerendered }; and set build.command in wrangler.jsonc to:

zig build zx -- build --target=wasm32-wasi --release=small --prerender

See Pre-rendering.

Built with

About

Cloudflare Template

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages