Configuration guides

Review Type Failures in a Release Configuration

·

Choose the expected shape for each deployment value before enabling it. Dotenv stores strings, so application code decides how to turn them into numbers, booleans and other values.

ENV Key Type Validator

Review three failures and apply one spelling fix

Choose Load type failures and Validate key types. The result shows 5 checked, 3 findings and 1 without a rule. PRIVATE_TOKEN has no inferred type and the report omits its value.

Select Apply 1 boolean case fix. The editor changes FEATURE_EXPORT_ENABLED from TRUE to true and rechecks the draft. The report shows 2 findings. Open env-type-findings.json and confirm lines 2 and 4 are the remaining failures.

Review three failures and apply one spelling fix
Source lineKeyExpected rule
2HTTP_PORTFinite decimal
3FEATURE_EXPORT_ENABLEDLiteral true or false
4API_BASE_URLAbsolute HTTP or HTTPS URL

Open ENV Key Type Validator and load type failuresNode.js dotenv values and string behavior

Replace name clues with explicit rules

Choose Load schema example to inspect a JSON object with env and schema blocks. APP_TIER uses an enum with values stable and canary. MAIL_QUEUE uses a number rule. Validating the sample finds two mismatches and accepts SERVICE_URL. The missing RETRY_LIMIT rule has required set to false.

When a schema is present only keys in it get type checks. A missing required key gets its own finding. Quote a large identifier or a JSON document if its exact text matters.

Open ENV Key Type Validator and load type failuresNode.js dotenv values and string behavior

Review numeric limits in the application

Choose Load boundary values. A zero retry limit and a decimal identifier pass the number syntax check. The exponent in 1e999 is outside the finite numeric range and fails.

The validator checks number syntax and finiteness. If an application bounds ports or counts, confirm those ranges in its configuration contract. URLs are checked locally as strings.

Open ENV Key Type Validator and load type failuresNode.js dotenv values and string behavior

Common questions

Is 0443 accepted as a number?

Yes. It is finite decimal text. The check leaves its leading zero and the stored string intact.

Can I set a type rule to optional?

Use an object rule with the type and required set to false. A supplied value still has to pass the selected type check.

Sources and example

Put it into practice.

Related guides