platform/packages/seeder
2022-01-04 20:03:52 +08:00
..
lib Merged from sdk-2.12.x_nnbd 2021-06-20 20:37:20 +08:00
test Removed redundant code 2021-06-26 21:13:43 +08:00
.gitignore Fixed test errors 2021-02-21 10:47:23 +08:00
.travis.yml Fixed test errors 2021-02-21 10:47:23 +08:00
analysis_options.yaml Updated linter 2022-01-04 20:03:52 +08:00
AUTHORS.md Merged from sdk-2.12.x_nnbd 2021-06-20 20:37:20 +08:00
CHANGELOG.md Merged from sdk-2.12.x_nnbd 2021-06-20 20:37:20 +08:00
LICENSE Updated linter 2022-01-04 20:03:52 +08:00
pubspec.yaml Updated linter 2022-01-04 20:03:52 +08:00
README.md Fixed test errors 2021-02-21 10:47:23 +08:00

angel_seeder

version 1.0. build status

Straightforward data seeder for Angel services. This is an almost exact port of feathers-seeder, so its documentation should almost exactly match up here. Fortunately, I was also the one who made feathers-seeder, so if you ever need assistance, file an issue.

Example

var app = new Angel()..use('/todos', new TodoService());

await app.configure(seed(
    'todos',
    new SeederConfiguration<Todo>(delete: false, count: 10, template: {
        'text': (Faker faker) => 'Clean your room, ${faker.person.name()}!',
        'completed': false
    })));

NOTE: Don't await seeding at application startup; that's too slow. Instead, run it asynchronously.