Configs — typed values
Typed config values you can change without a redeploy.
Ship a value — without a redeploy.
Typed key/value configs (string, number, boolean, JSON) you can change without shipping code. Schema-validated. Sub-millisecond evaluation in your SDK with no per-request fetch.
A config is a typed key/value you can change without a redeploy. Use one when the answer to "what should this be right now?" is not boolean — pricing, copy, limits, feature options, endpoint paths, model names, anything you'd otherwise hard-code as a constant.
When to use a config
Typed values→
string, number, boolean, or json. Schema-validated when you create the config and again
every time you change it.
Typed access in your code→
await config<number>('home.hero.duration') returns a typed value with the right TS type, not
unknown.
Fail-safe defaults→
Configs return last-known-good if our service is unreachable. Override with defaultValue per
call when "off" is the dangerous answer.
Audit log→
Every change records who, what, and when. Linkable in your incident timeline.
Reading a config
import { config } from "@shipeasy/sdk/server";
const heroTitle = await config<string>("home.hero.title");
const promoActive = await config<boolean>("promo.active");
const limits = await config<{ maxItems: number; maxPrice: number }>("checkout.limits");Sub-millisecond evaluation — no per-request fetch from your code.
Configs vs gates
Both are typed values you can change without a redeploy. Pick by the shape of the answer:
| Question | Gate | Config |
|---|---|---|
| Output | boolean | string / number / boolean / JSON |
| Targeting rules? | yes | no — values are global |
| Rollout percentage? | yes | no |
| Use case | "is feature X on?" | "what value should X be?" |
See also
- Quickstart — create your first config in 5 minutes
- Values — schema validation, JSON shapes, complex configs
- Targeting — when you need targeting, reach for a gate
- Decision tree — gate vs config vs killswitch vs experiment
Overrides
Force a gate on or off for specific user IDs — for QA, dogfood, demos, and customer-specific repros. Bypasses targeting and rollout.
Quickstart
From zero to a flag-gated feature in production — install the SDK, create a gate, roll it out, kill-switch it, and watch it in the dashboard. Five minutes, end to end.