For the next three (3) questions, assume the body of the ind…
For the next three (3) questions, assume the body of the index.ejs file contains only the code shown below Welcome to Our Page Item 1 Item 2 Item 3 with the referenced item.ejs file containing and that the server.js file has all the required packages, templating engines, paths, and file references set correctly, leaving just the “root” and “item” routes as shown below. You can assume that server.js is run on the localhost:port, where the port number is given and not relevant for the questions. app.get(‘/’, (req, res) => { res.render(‘index’, { itemName: null });});app.get(‘/item/:itemID’, (req, res) => { const prdID = parseInt(req.params.itemID); const curItem = itemData.find(item => item.itemID === prdID); if (curItem) { const prdName = curItem.itemName; const prdPrice = curItem.itemPrice; const prdImage = curItem.itemImage; res.render(‘index’, { itemID: prdID, itemName: prdName, itemPrice: prdPrice, itemImage: prdImage }); } else { res.status(404).send(‘Item not found’); }}); Finally, you can assume that the itemData is coming from the following items.json file: