title: Send iOS Push Notifications with Node.js on Openshift
body: <p>I'm developing a website , that should send push notifications to iOS devices. I followed <a href="https://blog.engineyard.com/2013/developing-ios-push-notifications-nodejs" rel="nofollow">this tutorial</a> to send notifications. On my localhost <a href="https://github.com/logicalparadox/apnagent" rel="nofollow">apnagent</a> works fine, but when I <code>git push</code> it to my Openshift cloud I get the following errors in the terminal:</p>
  
  <pre><code>remote: Waiting for application port (8080) become available ...
  remote: Application 'apnagent' failed to start (port 8080 not available)
  remote: -------------------------
  remote: Git Post-Receive Result: failure
  remote: Activation status: failure
  remote: Activation failed for the following gears:
  remote: 55c3344c89f5cf720xxxxxxx (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/55c3344c89f5cf720xxxxxxx/nodejs
  remote: #&lt;IO:0x00000000f1c278&gt;
  remote: #&lt;IO:0x00000000f1c200&gt;
  remote: )
  remote: Deployment completed with status: failure
  remote: postreceive failed
  To ssh://55c3344c89f5cf720xxxxxxx@apnagent-xxxxxxx.rhcloud.com/~/git/apnagent.git/
     bbcf2a3..87exxxx  master -&gt; master
  </code></pre>
  
  <p>My package.json looks like this:</p>
  
  <pre><code>{
    "private": true,
    "name": "apnagent",
    "version": "0.0.0",
    "dependencies": {
      "apnagent": "1.0.x"
    },
    "engines": {
      "node": "&gt;=0.10.22",
      "npm": "&gt;=1.3.14"
    },
    "scripts": {
      "start": "node agent/_header.js"
    },
    "main": "agent/_header.js"
  }
  </code></pre>
  
  <p>I think i should use somehow <code>process.env.OPENSHIFT_NODEJS_PORT</code> as port on the server, or something like this. I'm sure, I've done some configuration mistake since on my local machine everything works fine.</p>