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

Popular posts from this blog

\\u0000 cannot be converted to text error \\u0000 cannot be converted to text error

How to create @click on select menu in VueJS How to create @click on select menu in VueJS

Using Ts-Standard linting, JSDoc comment at beginning of file triggers "This rule requires the `strictNullChecks` compiler option" error Using Ts-Standard linting, JSDoc comment at beginning of file triggers "This rule requires the `strictNullChecks` compiler option" error