SAILS-SEED 
Installation
npm install sails-seed
Depending on you version of sails, sails-seed is treated differently
On install, a config/seed.js is created. Here you will put your seeding data.
Sails 0.11
For Sails 0.11 and greater there is nothing further to do. Sails-seed runs as an installable hook.
Sails 0.10
For Sails 0.10 and previous, a file of api/hook/seed/index.js is created on installation.
No further configuration is required, but this file is necessary for the data to seed.
Usage
Place your seeding data in the config/seed.js file.
For exampe, for a Person model, your config/seed.js file might look like
module.exports.seed = {
person: [
{
firstName: 'Luke',
lastName: 'Skywalker'
},
{
firstName: 'Darth',
lastName: 'Vader'
}
]
}
By default, sails-seed will overwrite the data which is present. If you would not like your
seed to overwrite, your new config/seed.js file might look like
module.exports.seed = {
person: {
data: [
{
firstName: 'Luke',
lastName: 'Skywalker'
},
{
firstName: 'Darth',
lastName: 'Vader'
}
],
overwrite: false
}
}
Author
M. Elliot Frost, CEO of Frostware