I have an array of people as follows:
people = ['personA', 'personB', 'personC'];
I want to be able to display a page about the person based on the url. For example, localhost:3000/people/personA would direct me to a page about personA.
How do I do so without having to specify the following multiple times for each team member? Is there a way I can grab the part after '/people/'?
app.get('/people/personA', (req, res) => {
// render view for personA
}
});