node package manager


Adds a convenience app.alias() method to Express.


Adds a convenience app.alias() method to Express for aliasing redirect routes.

Supports both Express 2 and Express 3.

// uses Express's default redirect status (currently 302): 
app.alias('/privacy', '/privacy-policy');
app.alias('/terms', '/terms-of-service');
// but you can explicitly specify a status as well: 
app.alias('/aseem', '/aseemk', 301);
npm install express-alias

You can either require() Express normally and then extend it:

var express = require('express');

Or just require() this module, which returns the extended Express for convenience:

var express = require('express-alias');

Support route parameters (e.g. '/user/:id''/users/:id').

MIT. © 2012 Aseem Kishore.

TJ Holowaychuk for the awesome Express.