Javascript 如何设置参数有多个斜线的快速路线?

Javascript 如何设置参数有多个斜线的快速路线?,javascript,node.js,express,Javascript,Node.js,Express,我正在尝试设置一个端点,如下所示: http://localhost:5000/guardian/lifeandstyle/2020/apr/26/bring-your-skin-to-life-with-a-hint-of-bronzer 我当前设置的端点如下所示: router.get('/guardian/:articleId', (req, res) => { const id = req.params.articleId; console.log(id); axios.ge

我正在尝试设置一个端点,如下所示:

http://localhost:5000/guardian/lifeandstyle/2020/apr/26/bring-your-skin-to-life-with-a-hint-of-bronzer
我当前设置的端点如下所示:

router.get('/guardian/:articleId', (req, res) => {

const id = req.params.articleId;
console.log(id);

axios.get('https://content.guardianapis.com/'+ id +'?api-key=' + guardianapi + '&show-blocks=all')
    .then(function (response) {
        res.send(response.data);
    });
});
但是,一旦我在浏览器中输入端点,就会出现404错误参见下面的示例:


您只需在路由中放置多个
/
,以及多个以
开头的名称:

您在上述端点中的articleId是什么?
app.get('/users/:userId/books/:bookId', function (req, res) {
  res.send(req.params)
})