finish dis

This commit is contained in:
Tommy Parnell
2015-10-16 22:46:19 -04:00
parent 2ad55507ca
commit da0fa2838d
2 changed files with 4 additions and 3 deletions

1
readme.md Normal file
View File

@@ -0,0 +1 @@
Redirect to various sites of mine based on the hosts cname (since I own multiple domains)

View File

@@ -5,7 +5,7 @@ var port = process.env.PORT || 3000;
app.get('/*', function (req, res) {
var host = S(req.headers.host);
if(host.contains('github')){
return res.redirect(301, 'https://github.com/tparnell8');
}
@@ -18,7 +18,7 @@ app.get('/*', function (req, res) {
if(host.contains('resume')){
return res.redirect(301,'http://resume.tparnell.io');
}
res.end("Error no redirects found");
res.status(500).end("Error no redirects found");
});
var server = app.listen(port, function () {
@@ -26,4 +26,4 @@ var server = app.listen(port, function () {
var port = server.address().port;
console.log('listening at http://%s:%s', host, port);
});
});