Quick Start

Minimal -- three fields plus a start command:

version: launch/v1
name: my-api
runtime: node
commands:
  start: "node server.js"

Save this as a file named Launchfile in your project root. Validate it with the CLI:

npx launchfile validate

Three fields and a start command — that's a complete app descriptor.

Single component with a database and health check:

version: launch/v1
name: my-app
runtime: node
requires: [postgres]
commands:
  start: "node server.js"
health: /health

The requires shorthand declares a Postgres dependency. You don't configure Postgres yourself — a Launchfile-compatible provider provisions it and wires the connection details into your environment. The health: /health shorthand tells the provider how to verify your app is ready.

Multi-component app:

version: launch/v1
name: hedgedoc

components:
  backend:
    runtime: node
    provides:
      - protocol: http
        port: 3000
    requires:
      - type: postgres
        set_env:
          DATABASE_URL: $url
    commands:
      start: "node dist/main.js"

  frontend:
    runtime: node
    depends_on:
      - component: backend
        condition: healthy
    provides:
      - protocol: http
        port: 3001
        exposed: true

The depends_on field ensures frontend waits for backend to become healthy before starting. The expression $components.backend.url automatically resolves to the backend's URL at deploy time — no hardcoded ports or hostnames.

Next Steps

esc
Type to search the docs