Issue
I am trying to understand the cooperation of Angular and Node.js on the backend. I can't figure out however, how to use REST for data transfer between the two.
I have:
- Node.js backend running on port
8000
, responding to various GET and POST requests (via cURL). - Angular frontend is loaded through Apache, running on port
80
.
Naturally, the JavaScript console identifies it as not allowed by Access-Control-Allow-Origin
.
How is this commonly solved? Am I doing it wrong? Should I not run the frontend through Apache?
Solution
One way to solve it is using Cross-origin Resource Sharing. Browser support is decent as well.
Answered By - NilsH
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.