You can debug in the project to determine the problem that occurred at that step If it is not included in the code at all, it means that the service is not up, or there is a configuration problem Step by step to eliminate the possibility, be good at debug, hehe
Try using [http://localhost:port number] instead (affected by other programs or software, it is very likely that http://ip:port cannot be accessed)
Check whether the access path is correct (related to the configuration, the reason is that access to a certain directory may only be set, and other directories cannot be accessed, so the url needs to be rewritten)
I think the front-end should do its job honestly and well. Don’t think that just because node.js can write the back-end, you should think that others’ years of Java back-end reading has been wasted.
You can debug in the project to determine the problem that occurred at that step
If it is not included in the code at all, it means that the service is not up, or there is a configuration problem
Step by step to eliminate the possibility, be good at debug, hehe
Check whether your res or response is returned in time
Open firebug, click on the network request, and see if there are more details in the response?
Check whether the port is correct
Check whether the port is occupied. If so, kill the occupied port
lsof -i:xxxx xxxx is the port
kill -9 PID
Check whether the server is opened successfully
Check whether the port is correct or duplicate
Try using [http://localhost:port number] instead (affected by other programs or software, it is very likely that http://ip:port cannot be accessed)
Check whether the access path is correct (related to the configuration, the reason is that access to a certain directory may only be set, and other directories cannot be accessed, so the url needs to be rewritten)
I think the front-end should do its job honestly and well. Don’t think that just because node.js can write the back-end, you should think that others’ years of Java back-end reading has been wasted.