Skip to content

seed ​

Apply seed data to a running iwentsourcing API by pushing the events defined in your defineSeed exports.

Usage ​

bash
iwentsourcing seed <src...> [options]
ArgumentDescription
<src...>Source entry file(s) that export StreamSeed objects

Options ​

FlagDefaultDescription
--host <url>http://localhost:3333API host URL
-t, --tenant <tenant>defaultTenant to seed

What It Does ​

  1. Compiles the source entry file
  2. Finds all exported StreamSeed objects (created with defineSeed)
  3. 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