If using artisan serve, try changing to an actual server, apache or nginx.
Dec 30, 2022
2
Level 3
Laravel Breeze + NextJS API Call
Hello
I'm using the starter kit provided by Laravel for a backend powered by Laravel and frontend NextJS. I'm using the following snippet to make an API call to my backend hosted on localhost:8000
export async function getStaticProps() {
const response = await axios.get('/products');
return {
props: {
products: response.data.data
},
}
}
When trying to visit the page I receive the following error:
Error: connect ECONNREFUSED ::1:8000
Login, registration and password reset all just work fine. Does anyone have an idea?
Please or to participate in this conversation.