Node.js, express, how do I render multiple pages for my website? [closed] Node.js, express, how do I render multiple pages for my website? [closed]
I have a 100 page website currently served by PHP Apache. I want to convert this website to Node/Express. But does this mean I have to render each page separately, writing this code 100 times for each page?
app.get('/about', (req, res) => res.render('about'))
Thunder suggested excellent code (see below), but when I made the changes, all the pages could now render, but I would have to add the file extension to the browser address to make the page show. Thanks for any suggestions.
from Stackoverflow
Comments
Post a Comment