Initial content

This commit is contained in:
Adam Freeman
2024-05-29 18:54:49 +01:00
parent 2dbc1a8088
commit 5215a1d919
1944 changed files with 203378 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createCatalogRoutes = void 0;
const data_1 = require("../data");
const createCatalogRoutes = (app) => {
app.get("/", async (req, resp) => {
const products = await data_1.catalog_repository.getProducts();
resp.render("index", { products });
});
// app.get("/err", (req, resp) => {
// throw new Error ("Something bad happened");
// });
// app.get("/asyncerr", async (req, resp) => {
// throw new Error ("Something bad happened asynchronously");
// });
};
exports.createCatalogRoutes = createCatalogRoutes;