title: Merge separate ReactJS client frontend application with ASP.NET Core backend API?
body: <p>I'm developing a full-stack web application with an ASP.NET Core back-end that serves REST &amp; GraphQL APIs. The .NET Core app is structured the following way in Visual Studio:</p>
  
  <pre><code>Backend.API: the API portion of the project that contains all the controllers and GraphQL query/mutation definitions that the front-end application consumes.  
  Backend.Core: the portion of the back-end that defines all the user &amp; application models used by the Backend.Data portion.  
  Backend.Data: interacts with the database and defines all the repositories that the Backend.API portion uses when returning data for GraphQL queries, etc.
  </code></pre>
  
  <p>The back-end .NET Core APIs are consumed by a front-end ReactJS application that is entirely separate from the C# Project (created as a separate ReactJS app).</p>
  
  <p>I didn't want to use the ReactJS ASP.NET Core template as I wanted to maintain a separation of concerns between front- and back-end, which a template like that would have blurred. So far, I've been able to allow the front-end ReactJS application to consume the backend ASP.NET Core API by providing the localhost URL the back-end launches on (i.e. the ReactJS app launches on localhost:3000 and fetches from API endpoints on localhost:5437 where the back-end is launched by Visual Studio). However, this separation between the two portions isn't feasible when I want to, for example, deploy the website--I need to combine the front-end and back-end projects so that they operate under the same URL.</p>
  
  <p>Therefore, this poses the question: what's the best way to merge my separate front-end ReactJS app with my back-end ASP.NET Core API so that they operate under a single URL?</p>