let cart = [{
qty: 2, //количество
cost: 5, //ценник за шт.
},{
qty: 2,
cost: 5,
},{
qty: 1,
cost: 5,
},];
let total = 0;
cart.map((item)=>{
return total = total + (item.qty * item.cost);
})
// total = 25
var statics = require('serve-static');
...
app.use(statics(path.join(__dirname, 'public')));