In ExpressJS, how to right the following in one route using RegEx?
app.get('/blog', blog.list); app.get('/blog/p/:page?', blog.list);
What the point of using RegExp here? Express patterns is simpler, yet almost as powerful as regular expressions:
This route will match all of the following urls:
req.params.page will contain page number or will be
undefined if it wasn't supplied.