Skip to content

Instantly share code, notes, and snippets.

@Enome
Created September 11, 2012 19:44
Show Gist options
  • Save Enome/3701500 to your computer and use it in GitHub Desktop.
Save Enome/3701500 to your computer and use it in GitHub Desktop.
var render = function (mobile, normal) {
return function (req, res) {
if (mobile) {
res.render(mobile);
} else {
res.render(normal);
}
};
}
app.get('/', function (req, res, next) {
res.locals.something = 'Hello';
next();
}, render('mobile/index', 'normal/index') );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment