Skip to main content
PercherPercher

Deploy guide · runtime = "node"

Deploy Fastify on Percher

Fastify is a performance-focused Node web framework with built-in JSON schema validation, structured logging, and a plugin system. Detect, build, and runtime on Percher are identical to Express.

Why Percher fits

  • Pino logging integrates straight with `bunx percher logs` — JSON log lines come through structured and grep-able.
  • Fastify's startup is fast enough that the wake-from-sleep cold start on the Free tier is barely noticeable.

Quick start

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

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

percher.toml

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

[app]
name = "my-api"
runtime = "node"
framework = "fastify"

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

Common gotchas

  • Bind to `0.0.0.0`, not `127.0.0.1` — Percher's health probe hits the container's network namespace IP, and a loopback-only bind looks like a hard fail.
  • Set `port: Number(process.env.PORT) || 3000` in `fastify.listen({ ... })`; the env var is always a string.

Related docs

Ready to deploy Fastify?

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

Sign up free

← Browse all deploy guides