Database seed module for loopback applications.
> npm i slu-seed --save
...
"slu-seed": {}
...
For example:
// ./server/db/seeds/development/users.js
User.seed({
"username": "bob",
"password": "secret",
"email": "[email protected]"
});
- seed data using
slu
command line. Before this, you should install slu first.
> slu seed
- or seed data in program.
...
// server/boot/seeds.js
module.exports = function (app, cb) {
app.seed(cb);
}
...
> slu seed harvest
MIT © Tao Yuan