CLI
Run, build, deploy, and clean an Ecomiq store.
The package installs the ecomiq binary. Run it from the project root, where
ecomiq.config.js and pages/ are located.
| Command | What it does |
|---|---|
ecomiq dev | Generates the internal app and starts SSR with HMR. |
ecomiq build | Builds for Cloudflare Workers in .ecomiq/dist. |
ecomiq deploy | Builds again and publishes the Worker with Wrangler. |
ecomiq clean | Deletes only the generated .ecomiq directory. |
With the recommended scripts:
pnpm dev
pnpm build
pnpm deploy
pnpm cleanYou can also invoke the binary directly:
pnpm exec ecomiq devDevelopment
ecomiq dev uses Node, port 3000, and HTTP by default. Change those values in
ecomiq.config.js, not with flags:
dev: {
port: 3100,
runtime: "workerd",
https: true,
}The CLI watches pages/ and regenerates routes when files are created, renamed,
or deleted. It ignores hidden files, __tests__, and *.test.* or *.spec.*
files.
Generated files
.ecomiq/ contains the router, server entry, styles, route manifest, and
Wrangler configuration. It is a disposable build artifact.
If it becomes stale after a version change:
pnpm clean
pnpm devNo scaffolding commands
The current CLI has no init, create, or flags such as --port or --name.
Configure the project in ecomiq.config.js.