slu-seed
Database seed module for loopback applications.
Installation
> npm i slu-seed --save
Usage
component-config.json
1. added to ..."slu-seed": {}...
./server/db/seeds/{env}/{any_name}.js
.
2. put sample data to For example:
// ./server/db/seeds/development/users.jsUser;
3. seed data
- seed data using
slu
command line. Before this, you should install slu first.
> slu seed
- or seed data in program.
...// server/boot/seeds.jsmodule { app;}...
4. create seeds using data stored in database
> slu seed harvest
License
MIT © Tao Yuan