const database = require('../source/database') const estore = database('EStore') class Shop { constructor() {} async Main() { return estore.Query('SELECT * FROM Products').then(output => { const data = { start: `

This is the Shop page

`, body: '', end: `
` } if (output) { for (let i = 0; i < output[0].length; i++) { data.body += `

${output[0][i].ProductName}

ID: ${output[0][i].ID}

` } } else { data.body = ` There are no items in the database. ` } return data.start + data.body + data.end }) } Product() { const data = `

This is the Product page

Description

` return data } } module.exports = () => {return new Shop()}