我想像Instagram一樣設置我的路由(instagram.com/username)我試過這個:router.get('/:name', loggedin, function (req, res, next) {res.render('profile', {"Request name": req.user});}); 但是,如果我在登錄時訪問我的/logout路由或任何其他路由,它也會呈現個人資料頁面,而不是注銷
如何設置像Instagram這樣的路線?本地主機:3000/用戶名
弒天下
2022-09-02 20:58:03