title: How to use aps.cer file for APN (Push notification) with Node.js?
body: <p>I'm having issues with node.js sending push notifications, I think because I'm doing something wrong with my APN certificate thats generated in my apple developer account. Im getting this error from Node.js.  </p>
  
  <pre><code>VError: Failed to generate token: error:0906D06C:PEM routines:PEM_read_bio:no start line
  </code></pre>
  
  <p>I'm not sure I've generated the right file in the apple developer account. See below screenshot, when i click download this gives me a "aps.cer" file which is what i'm putting in my node.js project and using with node-app module. Here is how im setting it in my code: </p>
  
  <pre><code>let options = {
          token: {
              key: "aps.cer",
              keyId: "singlemeout.Single-Me-Out",
              teamId: "Team Name"
          },
          production: false
      };
  </code></pre>
  
  <p>Here is a screen shot of my certificate. </p>
  
  <p><a href="https://i.stack.imgur.com/wpupE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wpupE.png" alt="enter image description here"></a></p>