Zero-config web deployment - generates hosting config and pushes straight to GitHub.
Deploying a Web target is a single command. The deploy tool scans your project, generates the hosting configuration for the provider you pick, and pushes it to GitHub - your provider then builds from that repository automatically.
It is already bundled into every Bini.js scaffold and exposed as npm run deploy. This page covers the Web hosting providers. For desktop and mobile targets, see Deployment Overview.
Already included in every Bini.js scaffold. To add it to an existing project:
| Provider | Runtime | Config generated |
|---|---|---|
| Node.js | Node | None |
| Netlify | Netlify Functions | netlify.toml |
| Vercel | Node.js Runtime | vercel.json |
| Cloudflare Workers | Workers | wrangler.toml |
| Deno Deploy | Deno | server/index.ts |
src/app/api/.The default hosting choice. The deploy tool writes no files - the next steps point to your build and start scripts and to the production server, which listens on $PORT (default 3000).
Choose Web, then Node.js (the default) when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Works out of the box on Railway, Render, Fly.io, or a VPS running pm2. See Production Server for the full runtime reference.
API routes run as Netlify Functions.
Choose Web, then Netlify when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
netlify.tomlnetlify/functions/api.mjsnetlify/edge-functions/spa-fallback.ts or .js - only without pre-renderingWith pre-rendering enabled, netlify.toml gains a 404 redirect to /404.html. Without it, an edge function rewrites unmatched page requests to index.html.
fs, nodemailer) may not work there.API routes run on Vercel's Node.js runtime.
Choose Web, then Vercel when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
vercel.jsonapi/index.ts or .jsapi/tsconfig.json - only for TypeScript projects with API routesAPI routes run as a Cloudflare Worker.
Choose Web, then Cloudflare when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
wrangler.tomlworker.ts or .js - only when the project has API routespublic/.assetsignoreOr deploy manually with Wrangler once the entry file exists:
API routes run on Deno. The generated entry is a static server for dist/ that also serves the API, listening on PORT (default 3000). No config file is written.
Choose Web, then Deno when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
server/index.ts or .jsEvery provider mounts the same file-based routes from src/app/api/, dynamic segments and catch-alls included:
Each route exports a default handler that accepts a Request and returns a Response (or a JSON-serializable value):
Files that import hono are detected automatically and mounted as a full Hono app instead:
origin already set is used; otherwise origin is added with the repository URL.--branch, the interactive branch list, or the remote's default branch (falling back to main). Pushes with git push origin HEAD:<branch> --set-upstream.user.name / user.email are not set, interactive runs prompt for them; non-interactive runs fail.--allow-unrelated-histories -X ours, keeping your local version of any conflicting file. A real conflict stops the process and prints manual recovery steps.| Requirement | Notes |
|---|---|
| Node.js | A version whose node:util provides styleText and parseArgs. |
| git | Used for every git operation. |
| GitHub repository | An HTTPS URL such as https://github.com/user/my-app. |
| Git credentials | Pushes use git over HTTPS. Configure Git Credential Manager. |
| GitHub CLI (gh) | Only for native deploys that upload signing secrets. Must be logged in. |
Where to deploy a Bini.js app.
Pre-render every route to static HTML.
Run the production server for Node.js hosting.
Set secrets on each provider.
Zero-config web deployment - generates hosting config and pushes straight to GitHub.
Deploying a Web target is a single command. The deploy tool scans your project, generates the hosting configuration for the provider you pick, and pushes it to GitHub - your provider then builds from that repository automatically.
It is already bundled into every Bini.js scaffold and exposed as npm run deploy. This page covers the Web hosting providers. For desktop and mobile targets, see Deployment Overview.
Already included in every Bini.js scaffold. To add it to an existing project:
| Provider | Runtime | Config generated |
|---|---|---|
| Node.js | Node | None |
| Netlify | Netlify Functions | netlify.toml |
| Vercel | Node.js Runtime | vercel.json |
| Cloudflare Workers | Workers | wrangler.toml |
| Deno Deploy | Deno | server/index.ts |
src/app/api/.The default hosting choice. The deploy tool writes no files - the next steps point to your build and start scripts and to the production server, which listens on $PORT (default 3000).
Choose Web, then Node.js (the default) when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Works out of the box on Railway, Render, Fly.io, or a VPS running pm2. See Production Server for the full runtime reference.
API routes run as Netlify Functions.
Choose Web, then Netlify when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
netlify.tomlnetlify/functions/api.mjsnetlify/edge-functions/spa-fallback.ts or .js - only without pre-renderingWith pre-rendering enabled, netlify.toml gains a 404 redirect to /404.html. Without it, an edge function rewrites unmatched page requests to index.html.
fs, nodemailer) may not work there.API routes run on Vercel's Node.js runtime.
Choose Web, then Vercel when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
vercel.jsonapi/index.ts or .jsapi/tsconfig.json - only for TypeScript projects with API routesAPI routes run as a Cloudflare Worker.
Choose Web, then Cloudflare when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
wrangler.tomlworker.ts or .js - only when the project has API routespublic/.assetsignoreOr deploy manually with Wrangler once the entry file exists:
API routes run on Deno. The generated entry is a static server for dist/ that also serves the API, listening on PORT (default 3000). No config file is written.
Choose Web, then Deno when prompted. Then confirm the branch and commit message:
For scripts and CI, skip the prompts with flags:
| Flag | Description |
|---|---|
--platform | web, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others. |
--hosting | Web only - node (default), netlify, vercel, cloudflare, deno. |
--repo | GitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix). |
--branch, -b | Branch to push to. Default: the remote's default branch, otherwise main. |
--message, -m | Commit message. Default: chore: add deployment configuration. |
--generate-entry | Generate the production entry file only (netlify, vercel, cloudflare, deno) and exit. |
--dry-run | Show what would be written, removed, and pushed, but do nothing. |
--yes, -y | Skip prompts. Requires --platform and --repo. |
--help, -h | Print help. |
Generates:
server/index.ts or .jsEvery provider mounts the same file-based routes from src/app/api/, dynamic segments and catch-alls included:
Each route exports a default handler that accepts a Request and returns a Response (or a JSON-serializable value):
Files that import hono are detected automatically and mounted as a full Hono app instead:
origin already set is used; otherwise origin is added with the repository URL.--branch, the interactive branch list, or the remote's default branch (falling back to main). Pushes with git push origin HEAD:<branch> --set-upstream.user.name / user.email are not set, interactive runs prompt for them; non-interactive runs fail.--allow-unrelated-histories -X ours, keeping your local version of any conflicting file. A real conflict stops the process and prints manual recovery steps.| Requirement | Notes |
|---|---|
| Node.js | A version whose node:util provides styleText and parseArgs. |
| git | Used for every git operation. |
| GitHub repository | An HTTPS URL such as https://github.com/user/my-app. |
| Git credentials | Pushes use git over HTTPS. Configure Git Credential Manager. |
| GitHub CLI (gh) | Only for native deploys that upload signing secrets. Must be logged in. |
Where to deploy a Bini.js app.
Pre-render every route to static HTML.
Run the production server for Node.js hosting.
Set secrets on each provider.