title: How do you customize a NodeJS deployment to Elastic Beanstalk?
body: <p>I have a web application written with NodeJS for the webserver and Angular on the frontend.</p>
  
  <p>The structure is like this</p>
  
  <pre><code>musicapp
     |-- server
     |     |--- src/
     |     |--- node_modules/
     |     |--- package.json
     |--- client
           |--- src/
           |--- node_modules/
           |--- package.json
  </code></pre>
  
  <p>When I deploy to Elastic Beanstalk using <code>eb deploy</code> nothing happens, and I've realized it must be because the default action for Elastic Beanstalk is to call <code>npm install</code> and <code>npm start</code> but in my case, that doesn't do anything when called on the root.</p>
  
  <p>So my question is, how do I tell Elastic Beanstalk: <strong>upon deploy, <code>cd</code> to client and call <code>npm install</code>, <code>npm run build</code> and then <code>cd</code> to server and call <code>npm install</code>, <code>npm start</code></strong> ?</p>
  
  <p>I can't find anything in the EB documentation that explains how one might do this.</p>