DocsPluginsShowcaseReleases
npmStar us on GitHub

Getting Started

IntroductionInstallationProject StructureLayouts and PagesLinking and Navigating

Routing

Folder-Based RoutingFile-Based RoutingDynamic RoutesParallel RoutesIntercepting RoutesCatch-All RoutesMDX & Markdown Pages

Special Files

Loading UIError BoundariesTemplateDefaultNot Found

Data Fetching

LoadersActionsAccessing Route Data

Metadata

Metadata & SEOOpen Graph & TwitterIcons & Favicons

API Routes

API Routes OverviewPlain Function HandlersHono IntegrationDynamic API Routes

Environment Variables

OverviewPrefixes & Client ExposureUsing in API Routes

Styling

CSS OverviewTailwind CSSCSS Modules

Platforms

WebWindowsmacOSLinuxAndroidiOS

Deployment

Deployment OverviewProduction ServerStatic ExportHosting Providers

A native React framework for building cross-platform applications from a single codebase.

Resources

  • Documentation
  • Plugins
  • Showcase
  • Releases

Community

  • GitHub Discussions
  • Reddit
  • Discord
  • LinkedIn

More

  • npm
  • GitHub
  • Issues
  • License

© 2026 Bini Cooperation.

Hosting Providers

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.

Installation

Already included in every Bini.js scaffold. To add it to an existing project:

>_Terminal
$ npm install --save-dev bini-deploy

Supported Providers

ProviderRuntimeConfig generated
Node.jsNodeNone
NetlifyNetlify Functionsnetlify.toml
VercelNode.js Runtimevercel.json
Cloudflare WorkersWorkerswrangler.toml
Deno DeployDenoserver/index.ts

How it works

  1. Scan - finds your API routes under src/app/api/.
  2. Generate - writes the platform-specific entry file and config for the target provider.
  3. Clean - removes leftover files from any previously selected provider, including when switching to Node.
  4. Push - commits and pushes to your GitHub repository.
  5. Deploy - your provider builds and deploys from GitHub automatically.

Node.js

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:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
● Node.js (default)
○ Netlify
○ Vercel
○ Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Works out of the box on Railway, Render, Fly.io, or a VPS running pm2. See Production Server for the full runtime reference.

Netlify

API routes run as Netlify Functions.

Choose Web, then Netlify when prompted. Then confirm the branch and commit message:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
● Netlify
○ Vercel
○ Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • netlify.toml
  • netlify/functions/api.mjs
  • netlify/edge-functions/spa-fallback.ts or .js - only without pre-rendering

With pre-rendering enabled, netlify.toml gains a 404 redirect to /404.html. Without it, an edge function rewrites unmatched page requests to index.html.

Netlify Functions run in a Node.js-like runtime but are not full Node - packages that depend on Node built-ins (fs, nodemailer) may not work there.

Vercel

API routes run on Vercel's Node.js runtime.

Choose Web, then Vercel when prompted. Then confirm the branch and commit message:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
○ Netlify
● Vercel
○ Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • vercel.json
  • api/index.ts or .js
  • api/tsconfig.json - only for TypeScript projects with API routes

Cloudflare Workers

API routes run as a Cloudflare Worker.

Choose Web, then Cloudflare when prompted. Then confirm the branch and commit message:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
○ Netlify
○ Vercel
● Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • wrangler.toml
  • worker.ts or .js - only when the project has API routes
  • public/.assetsignore

Or deploy manually with Wrangler once the entry file exists:

>_Terminal
$ npx wrangler deploy

Deno Deploy

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:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
○ Netlify
○ Vercel
○ Cloudflare Workers
● Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • server/index.ts or .js

API Routes

Every provider mounts the same file-based routes from src/app/api/, dynamic segments and catch-alls included:

api
ƒindex.ts
users
ƒindex.ts
ƒ[id].ts
posts
ƒ[...slug].ts
/api
/api/users
/api/users/:id
/api/posts/*

Each route exports a default handler that accepts a Request and returns a Response (or a JSON-serializable value):

src/app/api/users/[id].ts
export default async function handler(req: Request) {
  const id = new URL(req.url).pathname.split('/').pop();
  return { id, name: 'Ada Lovelace' };
}

Files that import hono are detected automatically and mounted as a full Hono app instead:

src/app/api/hello/route.ts
import { Hono } from 'hono';

const app = new Hono();

app.get('/', (c) => c.json({ message: 'Hello from Hono!' }));
app.post('/', async (c) => {
  const body = await c.req.json();
  return c.json({ received: body });
});

export default app;

Git Push Behavior

  • Existing remote - an origin already set is used; otherwise origin is added with the repository URL.
  • Branch - taken from --branch, the interactive branch list, or the remote's default branch (falling back to main). Pushes with git push origin HEAD:<branch> --set-upstream.
  • Identity - if user.name / user.email are not set, interactive runs prompt for them; non-interactive runs fail.
  • Remote-ahead recovery - if the remote has commits you do not have, the tool fetches and merges with --allow-unrelated-histories -X ours, keeping your local version of any conflicting file. A real conflict stops the process and prints manual recovery steps.

Requirements

RequirementNotes
Node.jsA version whose node:util provides styleText and parseArgs.
gitUsed for every git operation.
GitHub repositoryAn HTTPS URL such as https://github.com/user/my-app.
Git credentialsPushes use git over HTTPS. Configure Git Credential Manager.
GitHub CLI (gh)Only for native deploys that upload signing secrets. Must be logged in.

Deployment Overview

Where to deploy a Bini.js app.

Static Export

Pre-render every route to static HTML.

Production Server

Run the production server for Node.js hosting.

Environment Variables

Set secrets on each provider.

Was this helpful?
PreviousStatic Export

On this page

  • Overview
  • Installation
  • Supported Providers
  • Node.js
  • Netlify
  • Vercel
  • Cloudflare Workers
  • Deno Deploy
  • API Routes
  • Git Push Behavior
  • Requirements
Edit this page on GitHub

Hosting Providers

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.

Installation

Already included in every Bini.js scaffold. To add it to an existing project:

>_Terminal
$ npm install --save-dev bini-deploy

Supported Providers

ProviderRuntimeConfig generated
Node.jsNodeNone
NetlifyNetlify Functionsnetlify.toml
VercelNode.js Runtimevercel.json
Cloudflare WorkersWorkerswrangler.toml
Deno DeployDenoserver/index.ts

How it works

  1. Scan - finds your API routes under src/app/api/.
  2. Generate - writes the platform-specific entry file and config for the target provider.
  3. Clean - removes leftover files from any previously selected provider, including when switching to Node.
  4. Push - commits and pushes to your GitHub repository.
  5. Deploy - your provider builds and deploys from GitHub automatically.

Node.js

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:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
● Node.js (default)
○ Netlify
○ Vercel
○ Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Works out of the box on Railway, Render, Fly.io, or a VPS running pm2. See Production Server for the full runtime reference.

Netlify

API routes run as Netlify Functions.

Choose Web, then Netlify when prompted. Then confirm the branch and commit message:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
● Netlify
○ Vercel
○ Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • netlify.toml
  • netlify/functions/api.mjs
  • netlify/edge-functions/spa-fallback.ts or .js - only without pre-rendering

With pre-rendering enabled, netlify.toml gains a 404 redirect to /404.html. Without it, an edge function rewrites unmatched page requests to index.html.

Netlify Functions run in a Node.js-like runtime but are not full Node - packages that depend on Node built-ins (fs, nodemailer) may not work there.

Vercel

API routes run on Vercel's Node.js runtime.

Choose Web, then Vercel when prompted. Then confirm the branch and commit message:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
○ Netlify
● Vercel
○ Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • vercel.json
  • api/index.ts or .js
  • api/tsconfig.json - only for TypeScript projects with API routes

Cloudflare Workers

API routes run as a Cloudflare Worker.

Choose Web, then Cloudflare when prompted. Then confirm the branch and commit message:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
○ Netlify
○ Vercel
● Cloudflare Workers
○ Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • wrangler.toml
  • worker.ts or .js - only when the project has API routes
  • public/.assetsignore

Or deploy manually with Wrangler once the entry file exists:

>_Terminal
$ npx wrangler deploy

Deno Deploy

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:

>_Terminal
◇
Platforms?
◼ Web
◻ Desktop
◻ Android
◻ iOS
↑/↓ to navigate • Space: select • Enter: confirm
◇
Hosting provider?
○ Node.js (default)
○ Netlify
○ Vercel
○ Cloudflare Workers
● Deno Deploy
↑/↓ to navigate • Enter: confirm
◇
GitHub repository URL?
https://github.com/you/my-app
◇
Branch to push to?
● main (default)
○ + New branch...
↑/↓ to navigate • Enter: confirm
◇
Confirm deployment?
●Yes/○No
◆
Commit message?
chore: add deployment configuration

For scripts and CI, skip the prompts with flags:

>_Terminal
$ npx bini-deploy --platform web --hosting vercel --repo https://github.com/you/my-app --branch main --message 'chore: add deployment configuration' --yes
FlagDescription
--platformweb, or any of desktop, android, ios (comma-separated). Web cannot be combined with the others.
--hostingWeb only - node (default), netlify, vercel, cloudflare, deno.
--repoGitHub repository URL. Must match https://github.com/<owner>/<repo> (letters, digits, _, - only; no .git suffix).
--branch, -bBranch to push to. Default: the remote's default branch, otherwise main.
--message, -mCommit message. Default: chore: add deployment configuration.
--generate-entryGenerate the production entry file only (netlify, vercel, cloudflare, deno) and exit.
--dry-runShow what would be written, removed, and pushed, but do nothing.
--yes, -ySkip prompts. Requires --platform and --repo.
--help, -hPrint help.

Generates:

  • server/index.ts or .js

API Routes

Every provider mounts the same file-based routes from src/app/api/, dynamic segments and catch-alls included:

api
ƒindex.ts
users
ƒindex.ts
ƒ[id].ts
posts
ƒ[...slug].ts
/api
/api/users
/api/users/:id
/api/posts/*

Each route exports a default handler that accepts a Request and returns a Response (or a JSON-serializable value):

src/app/api/users/[id].ts
export default async function handler(req: Request) {
  const id = new URL(req.url).pathname.split('/').pop();
  return { id, name: 'Ada Lovelace' };
}

Files that import hono are detected automatically and mounted as a full Hono app instead:

src/app/api/hello/route.ts
import { Hono } from 'hono';

const app = new Hono();

app.get('/', (c) => c.json({ message: 'Hello from Hono!' }));
app.post('/', async (c) => {
  const body = await c.req.json();
  return c.json({ received: body });
});

export default app;

Git Push Behavior

  • Existing remote - an origin already set is used; otherwise origin is added with the repository URL.
  • Branch - taken from --branch, the interactive branch list, or the remote's default branch (falling back to main). Pushes with git push origin HEAD:<branch> --set-upstream.
  • Identity - if user.name / user.email are not set, interactive runs prompt for them; non-interactive runs fail.
  • Remote-ahead recovery - if the remote has commits you do not have, the tool fetches and merges with --allow-unrelated-histories -X ours, keeping your local version of any conflicting file. A real conflict stops the process and prints manual recovery steps.

Requirements

RequirementNotes
Node.jsA version whose node:util provides styleText and parseArgs.
gitUsed for every git operation.
GitHub repositoryAn HTTPS URL such as https://github.com/user/my-app.
Git credentialsPushes use git over HTTPS. Configure Git Credential Manager.
GitHub CLI (gh)Only for native deploys that upload signing secrets. Must be logged in.

Deployment Overview

Where to deploy a Bini.js app.

Static Export

Pre-render every route to static HTML.

Production Server

Run the production server for Node.js hosting.

Environment Variables

Set secrets on each provider.

Was this helpful?
PreviousStatic Export

On this page

  • Overview
  • Installation
  • Supported Providers
  • Node.js
  • Netlify
  • Vercel
  • Cloudflare Workers
  • Deno Deploy
  • API Routes
  • Git Push Behavior
  • Requirements
Edit this page on GitHub