I found the answer here:
https://www.openshift.com/blogs/run-your-nodejs-projects-on-openshift-in-two-simple-steps
The gist of it is this:
- Change main in package.json to set main to yourApp.js (as per this article)
- Make sure you're starting your server with the right IP and Port on OpenShift (see below)
app.set('port', process.env.OPENSHIFT_NODEJS_PORT || 8080);
app.set('ip', process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1');
and then
http.createServer(app).listen(app.get('port'), app.get('ip'), function(){
console.log('Express server listening on port ' + app.get('port'));
});