Carlos Gomez
08/05/2021, 8:50 PMseed.ts
file and prisma db seed --preview-feature
. Is it possible to invoke the seed with parameters? Possibly passed via env vars?
Edit: working sample in thread.Carlos Gomez
08/05/2021, 9:03 PMasync function main(): Promise<void> {
const ownerId = process.env['OWNER_ID'] || DEFAULT_ID;
console.log({ ownerId });
}
Ryan
08/06/2021, 5:51 AMdotenv
or dotenv-cli to achieve the same with env vars 🙂