Home > Back-end >  "Cannot GET" error in browser ,live-server(node.js)
"Cannot GET" error in browser ,live-server(node.js)

Time:10-13

I somehow installed node js , when I start the program from the terminal, VS Code gives an error in the browser Cannot GET and the error

Failed to load resource: the server responded with a status of 404 (Not Found)

appears in the console, and in the console the path name changes to Cannot GET . What is the problem? What is wrong with paths? Please help me figure it out. Screenshots won't upload here for some reason. :(

CodePudding user response:

I think you should open the index.html file in liveserver, not the app.js... index.html is including the app.js file, and app.js is not including index.html... so, try using index.html with liveserver...

$ liveserver index.html

CodePudding user response:

You're probably getting that error because it doesn't know where to make the request, try adding the backend URL in your .env

  • Related