title: vuejs: the correct path of local json file for axios get request
body: <p>In my Vue project, I have mocked some data for next step development. I already save the test data in a <code>json</code> file. And my vue project is typical one created with Vue-Cli, and the structure for my project goes as following:</p>
  
  <pre><code>My_project
      build
      config
      data
          service_general_info.json
      node_modules
      src
          components
              component-A
                  component-A.vue
  </code></pre>
  
  <p>as you can see, all the folders are created by the vue-cli originally. And I make a new folder <code>data</code> and place the test data json file inside.<br></p>
  
  <p>And I want to read in the data by <code>axios</code> library in an event handling function inside the component of <code>component-A</code> as following:</p>
  
  <pre><code>  methods: {
      addData() {
        console.log('add json data...');
        axios.get('./../../data/service_general_info.json');
      },
    },
  </code></pre>
  
  <p>I use relative path to locate the target file.But get 404 error back. So how to set the path correctly? Currently I am running the <code>dev</code> mode in local host. </p>
  
  <p>The error message is: <code>GET http://localhost:8080/data/service_general_info.json 404 (Not Found)</code></p>