title: Structuring and deploying node frontend and backend to Google App Engine
body: <p>I'm working on a React project with two node apps:</p>
  <ul>
  <li><code>Client</code>: Frontend code using React JS and Axios for making requests to my backend service.</li>
  <li><code>API</code>: Backend service using Mongoose to connect to MongoDB and Express for handling restful requests.</li>
  </ul>
  <p>I had a couple questions:</p>
  <ul>
  <li>Is it a best practice to create separate node applications like this for frontend and backend? I want to confirm this is a good setup.</li>
  <li>I've had some difficulties in deploying this to Google App Engine and could use some pointers.</li>
  </ul>
  <p>What I've currently done:</p>
  <ul>
  <li>Added an <code>api.yaml</code> to my API service subdirectory.</li>
  <li>Deployed using <code>gcloud app deploy client/app.yaml api/api.yaml</code> which deploys two services (frontend and backend).</li>
  </ul>
  <p>Is this a good approach?</p>
  <p>If so, the challenge I'm now facing is that my API service is deployed to a subdomain and requests from my frontend are failing. Locally I am using the <code>proxy</code> value to proxy requests to my backend port on localhost, but I'm not sure how to modify my app to dynamically make backend requests to the correct subdomain when in the production environment (I also think CORS comes into play).</p>