1.0.0 • Published 9 years ago

rendirect v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

Express middleware to render a message and redirect with the meta refresh tag.

Most of the time a 3XX status code with a location header (i.e. res.redirect) works, but sometimes it will be just useful to render a message before redirecting.

Install

npm install rendirect

Usage

//install the middleware
app.configure(function(){
  this.use(rendirect());
});

//rendirect
app.get('/', function (req, res){
  res.rendirect({
  	wait: 5, 
  	message: 'redirecting to the login', 
  	url: '/login'
  });
});

Custom template

  this.use(rendirect({view: 'myrendirectpage'}));

License

MIT - José F. Romaniello - 2013

1.0.0

9 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago