title: Makefile for Running Django Backend and React Frontend
body: <p>I am working on a project which is developed by Django REST Framework and served by React app.</p>
  
  <p>There is a partition between the back end and front end. The structure of the path is:</p>
  
  <pre><code>Root
  ├── backend
  ├── frontend
  ├── makefile
  ├── readme.md
  ├── requirements.pip
  └── venv
  </code></pre>
  
  <p>Currently, I run the project by opening two different terminals. Then I start the django server first and then start the react app.</p>
  
  <p>In terminal 1, I start the django server:</p>
  
  <pre><code>cd backend
  python manage.py runserver
  </code></pre>
  
  <p>In terminal 2, I start the react app:</p>
  
  <pre><code>cd frontend
  npm start
  </code></pre>
  
  <p>So, it is quite irritating to redo these commands each time to run the project. Recently, I have heard about <code>makefile</code>. I think this will reduce the number of commands to start the project.</p>
  
  <p>I have created the following <code>makefile</code>:</p>
  
  <pre><code>run:
      python backend/manage.py runserver
      cd frontend
      npm start
  </code></pre>
  
  <p>When I write <code>make run</code> it successfully starts the Django server but it does not start the React application. </p>
  
  <p>What am I missing here? Can I run the both commands in a single command using <code>make</code>?</p>
  
  <p><strong>Update:</strong>
  Problem is solved.</p>
  
  <p>The updated <code>makefile</code> contains:</p>
  
  <pre><code>django:
      bash -c "python backend/manage.py runserver"
  
  react:
      bash -c "cd frontend &amp;&amp; npm start"
  
  run:
      make django &amp; make react
  </code></pre>