Q:

How to use REST with Node.js and AngularJS being on different port?

I am trying to udnerstand cooperation of Angular and Node.js. However I can't figure out, how to use REST for data transfer. I have Node.js backend running on port 8000, responding to various GETs and POSTs. My 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?

A:

One way to solve it is using Cross-origin Resource Sharing. Browser support is decent as well.

