title: Deploying a React app with a Flask backend to Heroku (in the same repo)
body: <p>I'm hoping to deploy my React App with a Flask API backend to Heroku. It's all located in the same repo, and currently I'm proxying requests in my <code>package.json</code></p>
  
  <p>The current app architecture is this</p>
  
  <pre><code>api -&gt; flask api 
  public
  src -&gt; react code
  package.json
  </code></pre>
  
  <p>My Flask API includes</p>
  
  <pre><code>app = Flask(__name__, static_folder='../build', static_url_path='/')
  @app.route('/')
  def index():
      return redirect(url_for('static', filename='index.html'))
  ...
  # API code/endpoints
  </code></pre>
  
  <p>I want to build my React project and have the Flask API host it. Then all requests will hit the Flask endpoints. My app uses the Spotify API for auth and needs env variables for this. Does it make sense to host this all in one Heroku app or should I just break it up into a React &amp; Flask app and deploy the repos separately?</p>
  
  <p>Thanks!</p>