I have made a front application with angularjs and I start it with Grunt. On the other hand I have the Back part that I raise it with a Tomcat v8.5 Server.
To make the calls to back I use $ http of AngularJS using the routes that have provided Back, but it always gives me the error 404 that it does not find them.
My application runs on port 9090 and back on 8080, but I have CORS enabled and on other projects I have not had this problem.
I tried to put the absolute url with localhost: 8080 / urlpeticion and it pulls well so it is very clear to me that the problem is that they are in different ports, but I can not raise two servers in the same port, how do I make from port 9090 I changed the request to port 8080 with CORS? Or otherwise, I'm indifferent.
The call I make from front is: localhost: 9090 / services / rest / request , but back the wait in: localhost: 8080 / services / rest / request .
I need to know how to do a port mapping. I understood that Chrome's CORS plugin was doing it, but I do not know why it does not work for me.
$http({method: 'GET', url: '/servicios/rest/peticion'});