add product model and seed script

This commit is contained in:
2017-01-26 17:30:38 -07:00
parent 10aab7ca76
commit a41c7428b9
8 changed files with 120 additions and 30 deletions

10
cli/lib/fetch_products.js Normal file
View File

@@ -0,0 +1,10 @@
/* eslint-disable no-console */
const products = require('./mock_products');
function fetchProducts(count = 1) {
console.log('Seeding products from JSON');
return Promise.resolve(products.slice(0, count));
}
module.exports = fetchProducts;