Checking values before the app starts
Your app reads only the variables its settings declare. It checks every value against its type and refuses to start if any is missing or invalid, so it never opens its port with bad configuration. It reports the field and the variable's name, never the value.
jadpo dev runs the same check, against the environment and then
.env.local. It watches .env.local as it watches your source, and keeps
the last good version running when a change is invalid:
$ jadpo devjadpo dev, started 12:52:17error: `GREETING` isn't set reason: `greeting` is required: it has no `default:`, so the app can't start without a value for it. next: Run `jadpo config set greeting` to store it in `.env.local`, or set `GREETING` in the environment (human) rule: configuration.value_missing help: https://jadpo.dev/docs/errors/configuration.value_missingnot running this version: 1 error, waiting for a save that fixes them
A database that is set up correctly but down isn't a configuration error: the app starts, reports that it isn't ready, and recovers when the database is back (Health).
The interpreter and compiled code on every platform run the same check, so
jadpo config check and the app can't disagree about what is valid.
jadpo dev is the one place that makes up a value. A database connection
whose address no variable gives gets a database of its own, on a
throwaway PostgreSQL started for the session, so a fresh clone of the
project runs.
Markdown for agents: /docs/checking-values-before-the-app-starts.md.Built from Jadpo main at a707efb.