let queryString = 'SELECT * FROM products';
connection.query(queryString, function (err, results) {
for (let i in items) {
let products = [{
"id":items[i].id,
"name": items[i].name,
"price": items[I].price
}];
}});
link.addProducts(products);
link.addProducts(products);
? let queryString = 'SELECT * FROM products';
connection.query(queryString, function (err, results) {
for (let i in items) {
let products = [{
"id":items[i].id,
"name": items[i].name,
"price": items[I].price
}];
}
link.addProducts(products);
});