Stallyons Tester's avatar

Laravel Mix removing port number from localhost url

I'm creating Vue Laravel App. i have created an envoirment variable from api url

APP_URL=http://localhost:8000
MIX_API_URL="${APP_URL/api}"

but when accessing this variable in vue component, i'm getting url without port number which causes 404 error.

async getBounties(){
                console.log('Saif');
                console.log(process.env.MIX_API_URL);  // http://localhost//api. i'm getting this url
                const { data } = await axios.get(process.env.MIX_API_URL+'/bounties');
            }
0 likes
0 replies

Please or to participate in this conversation.