platform/archived_packages/seeder
2022-03-19 09:37:28 +08:00
..
lib Added melos 2022-03-19 09:37:28 +08:00
test Added melos 2022-03-19 09:37:28 +08:00
.gitignore Added melos 2022-03-19 09:37:28 +08:00
.travis.yml Added melos 2022-03-19 09:37:28 +08:00
analysis_options.yaml Added melos 2022-03-19 09:37:28 +08:00
AUTHORS.md Added melos 2022-03-19 09:37:28 +08:00
CHANGELOG.md Added melos 2022-03-19 09:37:28 +08:00
LICENSE Added melos 2022-03-19 09:37:28 +08:00
pubspec.yaml Added melos 2022-03-19 09:37:28 +08:00
README.md Added melos 2022-03-19 09:37:28 +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.