switch to using and running *.coffee files instead of *.js as this is an app, not a package

This commit is contained in:
2012-03-15 00:00:44 +00:00
parent cc124d99f6
commit 8c1ebf8b91
10 changed files with 8 additions and 124 deletions

View File

@@ -0,0 +1,7 @@
module.exports = (redirect_map = {}) ->
(req, res, next) ->
host = req.header('Host')
if redirect_map[host]
res.redirect(redirect_map[host])
else
next()

View File

@@ -1,16 +0,0 @@
(function() {
module.exports = function(redirect_map) {
if (redirect_map == null) redirect_map = {};
return function(req, res, next) {
var host;
host = req.header('Host');
if (redirect_map[host]) {
return res.redirect(redirect_map[host]);
} else {
return next();
}
};
};
}).call(this);