diff options
| author | Mhykol <mchaeldonald62@pm.me> | 2024-06-16 03:13:55 -0400 |
|---|---|---|
| committer | Mhykol <mchaeldonald62@pm.me> | 2024-06-16 03:13:55 -0400 |
| commit | e72a9e5911b0fcfdaf8048400b055fe03391ad30 (patch) | |
| tree | 7c289de79286181d7bb49e92b05744ef3a09bba3 /examples/shop.js | |
| parent | 43fc12689e9e4a455a41ba29a34455bddf3adb10 (diff) | |
Added examples
Diffstat (limited to 'examples/shop.js')
| -rw-r--r-- | examples/shop.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/examples/shop.js b/examples/shop.js deleted file mode 100644 index e75d289..0000000 --- a/examples/shop.js +++ /dev/null @@ -1,51 +0,0 @@ -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: ` - <section id='shop'> - <div> - <h1>This is the Shop page</h1> - `, - body: '', - end: ` - </div> - </section> - ` - } - if (output) { - for (let i = 0; i < output[0].length; i++) { - data.body += ` - <div class='item'> - <h2>${output[0][i].ProductName}</h2> - <p>ID: ${output[0][i].ID}</p> - </div> - ` - } - } else { - data.body = ` - There are no items in the database. - ` - } - return data.start + data.body + data.end - }) - } - Product() { - const data = ` - <section id='product'> - <div> - <h1>This is the Product page</h1> - <p>Description</p> - </div> - </section> - ` - return data - } -} - -module.exports = () => {return new Shop()} |
