Home > Net >  I have my axios calls data printed in the terminal
I have my axios calls data printed in the terminal

Time:05-06

I don't know how to explain it better: I'm using Visual Studio Code, Nuxt and Axios, and whenever I refresh my app in the browser I get all the content of my axios call printed in the vsc terminal.

I think I may have made some changes in the google inspector but I'm not sure.

first picture of vsc terminal

second picture of vsc terminal

CodePudding user response:

Nothing strange here, Nuxt is running on both client side and server side. Here, you have a console.log probably called in a context when both are available.

On top of that, the initial request is always coming from the server hence why you can see it in your terminal.

Similar to a Node.js app, the output of your console.log is on the "backend" aka you terminal here.

  • Related