To start creating our API calls, we need to add the axios plugin in our application:
- To do so, we will need to open the nuxt.config.js, file in the root folder, and add the axios property:
export default {
/* We need to change only the axios property for now, */
/* the rest we will maitain the same */
axios: {},
}
- On the axios property, add the following configuration properties:
- HOST and define it as '127.0.0.1'
- PORT and define it as '5000'
- https and define it as false
- debug and define it as true:
axios: {
HOST: '127.0.0.1',
PORT: '5000',
https: false,
debug: true, // Only on development
},