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 { html: data.start + data.body + data.end, assets: { css: ['main.css'], js: ['index.js', 'purify.js'] }, meta: { title: 'Shop Page', keywords: 'Shop', description: 'This is a shop page' } } }) } Product() { const data = `

This is the Product page

Description

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