diff --git a/Procfile b/Procfile index a553d73..60498b1 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: node ./bin/www +web: npm run build && npm start diff --git a/package.json b/package.json index b30b75a..1962752 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "dependencies": { "bluebird": "^2.3.11", "body-parser": "~1.8.1", + "browserify": "^7.0.0", "compression": "^1.2.2", "connect-flash": "^0.1.1", "connect-browserify": "^3.2.1", @@ -42,16 +43,15 @@ "react": "^0.12.1", "react-google-analytics": "^0.2.0", "react-router": "^0.11.6", + "reactify": "^0.17.1", + "envify": "^3.2.0", "serve-favicon": "~2.1.3", "spotify": "^0.3.0", "superagent": "^0.21.0", "superagent-bluebird-promise": "^0.5.1" }, "devDependencies": { - "browserify": "^7.0.0", "should": "^4.3.0", - "mocha": "^2.0.1", - "envify": "^3.2.0", - "reactify": "^0.17.1" + "mocha": "^2.0.1" } } diff --git a/routes/index.js b/routes/index.js index 949d926..89b9ce4 100644 --- a/routes/index.js +++ b/routes/index.js @@ -10,7 +10,9 @@ module.exports = function(req, res, next) { req.db.matches.find().sort({created_at:-1}).limit(6).toArray().then(function(docs){ var recents = []; docs.forEach(function(doc) { - recents.push(doc.services[doc._id.split("$$")[0]]); + if (doc._id.indexOf("$$") > -1) { + recents.push(doc.services[doc._id.split("$$")[0]]); + } }); Router.run(routes, req.url, function (Handler) {