You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 31, 2019. It is now read-only.
Hey there, so I have been struggling to find a node template that works right off the bat with codeship. This one did the trick. But since the app.js is wrapped in a var app = function () { trying to add within routes using var routes = require('./routes/routes'); and then app.use('/routes', routes); does not work when in the routes.js file I try to use var router = express.Router(); and:
router.get('/', function(req, res, next) {
res.render('index', { title: "Codefish", header: "I've entered the Codeship!", paragraph: "I just deployed my Node.js app with Codeship" });
});
Similarly if I try to refactor the app.js and remove the var app = function () { and inject into it the app.listen(... from start.js and alter the package.json to "main": "app.js", that works locally, but when I run it through to codeship > heroku, node does not automatically load and so nothing gets served... Any idea why this might be the case? Would you have a refactored version that works with routes etc...? Thank you.