We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we seed .js files so we can make data up? That'd be super mega awesome.
The text was updated successfully, but these errors were encountered:
Just wanted to leave a note here to say that this is possible.
seed/test.js
const faker = require('faker'); const seedUsers = (userCount = 10) => { const dataRows = []; for (let userIndex = 0; userIndex < userCount; userIndex += 1) { const user = faker.helpers.userCard(); dataRows.push({ Id: faker.random.uuid(), Label: faker.random.word(), name: user.name, email: user.email, }); } return dataRows; }; module.exports = seedUsers();
Simply set test.js as one of the sources in your serverless configuration:
test.js
custom: dynamodb: seed: test: sources: - table: TestTable sources: [./seed/test.js]
Sorry, something went wrong.
No branches or pull requests
Can we seed .js files so we can make data up? That'd be super mega awesome.
The text was updated successfully, but these errors were encountered: