create-duneta-app
v1.2.2
Published
Scaffold a new Duneta full-stack Cloudflare Workers project.
Readme
create-duneta-app
Scaffold a new Duneta full-stack Cloudflare Workers project.
Usage
npx create-duneta-app my-app
cd my-app
npm install
npm run devScaffold into the current directory:
npx create-duneta-app .Overwrite an existing directory:
npx create-duneta-app my-app --forceWhat you get
- React Router 7 web app (
app/pages/+routes/web.ts) - Hono API on the same Worker (
routes/api.ts+app/http/controllers/withApiRoute.define) dunetaCLI for dev, build, and deployconfig/client.tsandconfig/server.ts- Wrangler config for Cloudflare Workers
.npmrcwith pnpm hoist settings (see below)
{
"scripts": {
"prepare": "duneta prepare",
"dev": "duneta dev",
"build": "duneta build",
"deploy": "duneta deploy"
},
"dependencies": {
"duneta": "^1.2.0",
"react": "^19.2.7",
"react-dom": "^19.2.7"
}
}Dev server: http://localhost:8787 (HMR).
pnpm
The scaffold includes an .npmrc that forces a hoisted node_modules layout:
node-linker=hoisted
public-hoist-pattern[]=*Duneta (and tools it shells to — Wrangler, Vite, tsx) expect flat resolution. Keep this file if you use pnpm; it is harmless for npm and yarn.
Requirements
- Node.js ≥ 22.22
- Cloudflare account for deploy (
wrangler loginorCLOUDFLARE_API_TOKEN)
Related packages
| npm | Role |
|-----|------|
| duneta | CLI + bundled client & server |
License
MIT
