Runnable examples demonstrating the OpenDecree TypeScript SDK.
Start the decree server and seed example data:
# From this directory
make setupThis starts PostgreSQL, Redis, and the decree server via Docker Compose, then creates an example schema, tenant, and initial config values.
The tenant ID is written to .tenant-id — examples read it automatically.
npm installExamples use tsx to run TypeScript directly:
npm install -g tsx| Example | What it shows | Server required |
|---|---|---|
| quickstart | Type converters (Number, Boolean), try/finally |
Yes |
| live-config | ConfigWatcher, .on('change'), for await...of |
Yes |
| nextjs-integration | Singleton watcher pattern for server-side config | Yes |
| error-handling | RetryConfig, { nullable: true }, instanceof narrowing |
Yes |
# After make setup:
npx tsx quickstart/main.tsmake down