middleware-redirect
v1.0.1
Published
Downloads
2
Readme
middleware-redirect
node middleware that handles redirection.
Usage
redirect = require 'middleware-redirect'
# redirects `/foo` to `/bar`
router.get '/foo',
redirect '/bar'
# redirects `/foo/$var` to `/bar/$var`
router.get '/foo/:id',
redirect (req) -> "/bar/#{req.params.id}"