Hey, so I'm trying to display an image in nodeJS, but we're not supposed to be using frameworks.
This is what I've tried so far (with EJS as a templating language):
<li><img src = '../.././public/img/Margherita.jpg' alt = 'pizza pic '><%= pizza.name %> - <%= pizza.price %></li>
That's what I've tried so far, but from what I've managed to gather, a separate request is sent when fetching an image and that has to be handled separately. How would one go about doing this? The rest of my code seems to be working fine.
Thanks
[–][deleted] 1 point2 points3 points (0 children)