Skip to main content
PercherPercher

Deploy guide · runtime = "node"

Deploy HTMX + Express on Percher

HTMX is a small library that turns any HTML response into an interactive UI — no JS framework, no build step, just `hx-*` attributes on elements. The template pairs it with Express to render fragments server-side.

Why Percher fits

  • Server-rendered HTML + Caddy in front gives consistent sub-100 ms response times for European users.
  • No client-side build — the express server returns HTML fragments directly, so cold builds are as fast as a plain Node app.

Quick start

bunx percher create my-app --template htmx
cd my-app
bunx percher publish

The first command scaffolds a working HTMX + Express project plus a `percher.toml`. Publish builds and deploys it; the live URL prints on completion.

percher.toml

The canonical config for a HTMX + Express app on Percher. `bunx percher init` generates this automatically when it detects HTMX + Express in your project.

[app]
name = "my-app"
runtime = "node"
framework = "express"

[web]
port = 3000
health = "/health"

Common gotchas

  • Serve the htmx.js script from your own server or a known CDN — the deployment doesn't include a bundler, so add a `<script>` tag pointing at unpkg or a vendored copy.
  • Cache-Control headers on fragment endpoints matter — htmx fetches will re-request unless you set them.

Related docs

Ready to deploy HTMX + Express?

Free plan, no credit card. Live in under a minute.

Sign up free

← Browse all deploy guides