title: How to get data from local json file using actions and axios.get() (Redux)?
body: <p>I wrote Action, should get data from db.json file. But </p>
  
  <blockquote>
    <p><strong>Error</strong>: message "xhr.js:178 GET <a href="http://localhost:8083/data/db.json" rel="noreferrer">http://localhost:8083/data/db.json</a> 404
    (Not Found)".</p>
  </blockquote>
  
  <p>Why is it, if my path is correct (db.json is in the same folder)? In profileActions.js:</p>
  
  <pre><code>import axios from "axios";
  var customData = require('./db.json');
  
  export function fetchUsers(){
      return function(dispatch){
          axios.get('./db.json')
              .then((response) =&gt; {
                  dispatch({type:'FETCH_USERS_FULFILLED', payload:response.data});
              })
              .catch((err) =&gt; {
                  dispatch({type:'FETCH_USERS_REJECTED', payload:err});
              })
      }
  }
  </code></pre>