Minimal with Database

Single component with Postgres and a health check.

What this demonstrates

  • The `requires` array shorthand — `[postgres]` expands to `[{type: postgres}]`
  • Required resources are provisioned for you and their connection details injected
  • The `health` shorthand — a path string expands to `{path: /health}`

When to use this: Most web apps need a database — this is the typical starting point.

RequiresHealth
minimal-with-db.yamlView on GitHub
# yaml-language-server: $schema=../schema/launchfile.schema.json
version: launch/v1
name: my-app
runtime: node
requires: [postgres]
commands:
  start: "node server.js"

Key lines explained

requires: [postgres]
Shorthand for [{type: postgres}]. The DB is provisioned and $url, $host, etc. are injected.
health: /health
Shorthand for {path: /health}. This endpoint is checked to confirm readiness.
esc
Type to search the docs