Virtual Box Ubuntu, Laravel backend api, Vue frontend - can't connect Vue to Laravel api url -


i have virtualbox machine on windows 10, have laravel backend api, , vue frontend. when run vue npm run dev, starts vue app on localhost port 8080, , laravel app on vue.dev/api/quote (this post url)

i using axios , when in axios.post put laravel url, getting errors in browser console.

axios.post('http://vue.dev/api/quote',                     {content: this.quotecontent})                     .then(                         (response) => console.log(response)                     )                     .catch(                         (error) => console.log(error)                     ); 

i can access on ubuntu laravel url , works. cant find problem in vue, because when hit submit button on vue app, keep getting error.

enter image description here


Comments

Popular posts from this blog

unix - grep command not match start of new line with another regex -

sql - calculate weighted average for each day and id based on time intervals in PostgreSQL -

Sort a complex associative array in PHP -