seed
Apply seed data to a running iwentsourcing API by pushing the events defined in your defineSeed exports.
Usage
bash
iwentsourcing seed <src...> [options]| Argument | Description |
|---|---|
<src...> | Source entry file(s) that export StreamSeed objects |
Options
| Flag | Default | Description |
|---|---|---|
--host <url> | http://localhost:3333 | API host URL |
-t, --tenant <tenant> | default | Tenant to seed |
What It Does
- Compiles the source entry file
- Finds all exported
StreamSeedobjects (created withdefineSeed) - Pushes their events in order to the appropriate stream instance on the API
Example
bash
# Seed the local dev server
iwentsourcing seed src/state/export.ts
# Seed a staging environment
iwentsourcing seed src/state/export.ts --host https://api.iwentsourcing.com