Created
January 29, 2016 01:48
-
-
Save andreloureiro/ba2d9c16d75698e0643a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var faker = require('faker'); | |
| module.exports = function() { | |
| var db = { promotions: [] }; | |
| var total = 0; | |
| while (total < 30) { | |
| var title = faker.commerce.productName(); | |
| db.promotions.push({ | |
| id: faker.random.uuid(), | |
| name: title, | |
| hashtag: '#' + title.split(' ').join(''), | |
| startAt: faker.date.recent(), | |
| endAt: faker.date.future(), | |
| showCard: faker.random.boolean(), | |
| thumb: { large: faker.image.food() } | |
| }); | |
| total++; | |
| } | |
| return db; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment