Skip to content

Startup scenario #1832

@pmcelhaney

Description

@pmcelhaney

A scenario in index.ts called startup should run when the server initializes, right before the REPL starts. It will be used to seed dummy data.

If the function doesn't exist, skip.

Update the docs.

Also create a new pattern. Note that startup() can call other scenario functions and that is recommended to separate concerns and keep the startup function clean. It will need to pass the $ arg to the other functions.

Note that it can configure the other functions by passing additional arguments, e.g.

addPets($, 20, "dog")

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions