Quick Start

Bare minimum — the schema requires only name. In practice you also need a runtime and a start command for the platform to actually run your app:

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

Recommended minimal — declare the spec version explicitly so tooling knows which schema to validate against. version defaults to launch/v1 when absent, but stating it is best practice:

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

Local development — no container, no provisioning. Install deps and start a dev server:

name: my-app
runtime: bun
commands:
  build: "bun install"
  start: "bun run dev"

launchfile up . runs build then start. Swap the commands for any runtime — runtime: node with npm install / npm run dev, runtime: python with pip install -r requirements.txt / python manage.py runserver, etc. See spec/examples/local-dev.yaml. To run a different command from source than from the built artifact, declare a dev command.

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