So here are the steps I've taken so far:
- Created application on openshift
- Cloned application's repo
- Deleted all files for the sample app in the cloned repo
- Added my project files
- Performed a Git-Push which completed successfully.
I still see the default landing page:
The only odd thing I see in the deployment logs this warning, which makes no senses because it's not my code doing that (I'm basically just trying to deploy the sample app from Express)
Any ideas as to what could be causing this? I'm trying to dump Heroku but can't get basic things to work.
UPDATE: I found this KB article which explains how to run your own file (why this information isn't better documented and part of the basic tutorial is beyond me). It is still unclear to me whether the code in server.js is needed or not... Or I'm expected to always use server.js as a shell to all my code.
https://www.openshift.com/kb/kb-e1048-how-can-i-run-my-own-nodejs-script
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:
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')); });