title: How to programmatically start/stop Metro Bundler
body: <p>I'm trying to setup Continuous Integration for a React-Native project and run into some problems with the end to end testing, notably around the Metro bundler.</p>
  
  <p>It seems that using the react-native script is not reliable in this case:</p>
  
  <ul>
  <li>The iOS build spontaneously spawns a bundler in a new terminal and leaves it running after the build.</li>
  <li>The Android build relies on a running instance which must be started manually beforehand.</li>
  <li>The bundler can't be stopped by other means than signalling it (Ctrl+C or kill).</li>
  <li>There's no synchronization with the build to ensure the bundler is ready to process when the app launches.</li>
  </ul>
  
  <p>I would like to write a custom script that can start Metro, run the tests once the server is ready, and finally stop the server to cleanup the environment.</p>