title: Using NodeJS to self-update project
body: <p>I have a project that runs mainly on NodeJS. During startup, it creates a socket.io+http server and a few workers (mainly event listeners that do their job on specific events).</p>
  
  <p>Now I would like to implement a worker process that automatically checks if a new commit is available on a git repo that is hosted via GitLab on the same server. </p>
  
  <p>So I would like to know:</p>
  
  <ul>
  <li>Is there a npm module that can look up if a local and remote git repository match in commits?</li>
  <li>Or would it be more advised to use Redis' Pub/Sub and a git hook to notify the application about an update this way?</li>
  <li>Or is there one entirely different approach you would recommend?</li>
  </ul>
  
  <p>Currently this project is running as a development server and I might turn off the auto-update function once it is in productive state. But since I develop on my laptop but test on my remote server, an auto-updater would be handy.</p>