var express = require('express')
var redirect = require("express-redirect");
var vhost = require('vhost')

var app2014 = require('./2014/app')
var app2015 = require('./2015/app')
var app2016 = require('./2016/app')
var app17 = require('./2017/app')
var appSplash = require('./splash/app')

var server = express()
redirect(server);

server.set('port', process.env.PORT || 8080)
server.use(vhost('2014.coldfront.co', app2014))
server.use(vhost('2015.coldfront.co', app2015))
server.use(vhost('2016.coldfront.co', app2016))
server.use(vhost('2017.coldfront.co', app17))
server.use(vhost('localhost', app17))

server.redirect("2017.coldfrontconf.com", "https://2017.coldfront.co");
server.redirect("2016.coldfrontconf.com", "https://2016.coldfront.co");
server.redirect("2015.coldfrontconf.com", "https://2015.coldfront.co");
server.redirect("2014.coldfrontconf.com", "https://2014.coldfront.co");
server.redirect("coldfrontconf.com", "https://2017.coldfront.co");
server.redirect("coldfront.co", "https://2017.coldfront.co");

server.listen(server.get('port'), function () {
  console.log('Express server listening on port %d in %s mode', server.get('port'), server.settings.env)
})

@@ -30,52 +30,8 @@
 s')%0A
-var redirect = require(%22express-redirect%22);%0A
 var 
@@ -247,89 +247,767 @@
 var 
-server = express()%0Aredirect(server);%0A%0Aserver.set('port', process.env.PORT %7C%7C 8080
+root = express().get('/', function (req, res) %7B%0A  res.send(%60%3C!doctype html%3E%3Cmeta http-equiv=%22refresh%22 content=%220;url=https://2017.coldfront.co%22%3E%60)%0A%7D)%0A%0Avar root2016 = express().get('/', function (req, res) %7B%0A  res.send(%60%3C!doctype html%3E%3Cmeta http-equiv=%22refresh%22 content=%220;url=https://2016.coldfront.co%22%3E%60)%0A%7D)%0A%0Avar root2015 = express().get('/', function (req, res) %7B%0A  res.send(%60%3C!doctype html%3E%3Cmeta http-equiv=%22refresh%22 content=%220;url=https://2015.coldfront.co%22%3E%60)%0A%7D)%0A%0Avar root2014 = express().get('/', function (req, res) %7B%0A  res.send(%60%3C!doctype html%3E%3Cmeta http-equiv=%22refresh%22 content=%220;url=https://2014.coldfront.co%22%3E%60)%0A%7D)%0A%0Aredirect%0A%0Avar server = express()%0Aserver.set('port', process.env.PORT %7C%7C 8080)%0A%0Aserver.use(vhost('2014.coldfrontconf.com', root2014)
 )%0Ase
@@ -1048,24 +1048,25 @@
 , app2014))%0A
+%0A
 server.use(v
@@ -1122,17 +1122,17 @@
 ost('201
-6
+5
 .coldfro
@@ -1137,24 +1137,31 @@
 ront
+conf
 .co
+m
 ', 
-app2016
+root2015
 ))%0A
+%0A
 serv
@@ -1177,17 +1177,17 @@
 ost('201
-7
+6
 .coldfro
@@ -1197,18 +1197,20 @@
 co', app
-17
+2016
 ))%0Aserve
@@ -1226,50 +1226,12 @@
 st('
-localhost', app17))%0A%0Aserver.redirect(%22
 201
-7
+6
 .col
@@ -1248,62 +1248,45 @@
 .com
-%22, %22https://2017.coldfront.co%22);%0Aserver.redirect(%222016
+', root2016))%0A%0Aserver.use(vhost('2017
 .col
@@ -1303,62 +1303,40 @@
 .com
-%22, %22https://2016.coldfront.co%22);%0Aserver.redirect(%222015
+', root))%0Aserver.use(vhost('2017
 .col
@@ -1345,249 +1345,100 @@
 ront
-conf.com%22, %22https://2015.coldfront.co%22);%0Aserver.redirect(%222014.coldfrontconf.com%22, %22https://2014.coldfront.co%22);%0Aserver.redirect(%22coldfrontconf.com%22, %22https://2017.coldfront.co%22);%0Aserver.redirect(%22coldfront.co%22, %22https://2017.coldfront.co%22);
+.co', app17))%0A%0Aserver.use(vhost('coldfront.co', root))%0Aserver.use(vhost('localhost', app17))
 %0A%0Ase

Update redirects