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

Popular posts from this blog

angular - DownloadURL return null in below code -

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -