https://github.com/angel-dart/seeder
Straightforward data seeder for Angel services.
https://github.com/angel-dart/seeder
angel angel-framework seeder
Last synced: 4 months ago
JSON representation
Straightforward data seeder for Angel services.
- Host: GitHub
- URL: https://github.com/angel-dart/seeder
- Owner: angel-dart
- License: mit
- Created: 2016-06-23T21:16:33.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-18T18:20:17.000Z (over 8 years ago)
- Last Synced: 2025-10-23T07:04:18.396Z (8 months ago)
- Topics: angel, angel-framework, seeder
- Language: Dart
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angel_seeder
[](https://pub.dartlang.org/packages/angel_seeder)
[](https://travis-ci.org/angel-dart/seeder)
Straightforward data seeder for Angel services.
This is an almost exact port of [feathers-seeder](https://github.com/thosakwe/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
```dart
var app = new Angel()..use('/todos', new TodoService());
await app.configure(seed(
'todos',
new SeederConfiguration(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.