In this section, we will add the MirageJS server to the Vue application. Follow these steps to make the server available to your Vue application:
- Open the main.js file in the src folder.
- We need to declare the server as the first imported declaration, so it's available on the initial loading of the application:
import './server/server';
import Vue from 'vue';
import App from './App.vue';
Vue.config.productionTip = false;
new Vue({
render: h => h(App),
}).$mount('#app');