javascript - Express route handle for admin and admin/* with same routes -
my admin/whatever url rendering admin file when try hit admin show 404 not go in route. can create separate route url/admin other option. manage single route .
  app.get('/admin/*', function (req, res, next) {        res.render('admin');     }); 
remove / after admin can match route
app.get('/admin*', function (req, res, next) {        res.render('admin');   }); 
Comments
Post a Comment