Exposing Nuxt/vue front and laravel back end local env with Ngrok

787 views Asked by At

I have a local vue,nuxt enviroment that calls another local laravel api route. I am trying to expost the ports with ngrok.

My Nuxt/vue env

Nuxt config

 // Axios module configuration (https://go.nuxtjs.dev/config-axios)
  axios: {
    baseURL: 'http://localhost:8001/api/'
  },

I am able to expose both port 3001 as well as port 8001 with ngrok but it seem like my front end is unable to talk to my ngrok port 8001, does anyone have any pointers?

ngrok

port 3001

./ngrok http 3001

port 8001

./ngrok http 8001

1

There are 1 answers

0
Tamzid Oronno On
  1. Run ngrok for the laravel project
  2. Then run it for nuxt/vue front-end