¿Necesitamos proxypass para acceder al back-end express desde el front-end angular cuando usamos 2 puertos separados en localhost?
<div class="row" ng-controller="UserController"> <table class="table"> <thead> <tr> <th>First name</th> <th>Last name</th> </tr> </thead> <tbody> <tr ng-repeat="user in users"> <td>{{user.firstName}}</td> <td>{{user.lastName}}</td> </tr> </tbody> </table> </div> angular.module('PharmacyApp').factory('UserService', ['$http', function ($http) { return { get: () => $http.get('/users').then(response => response.data), add: user => $http.post('/users', user).then(response => response.data), getById: id => $http.get('/users/' + id).then(response => response.data), addComment: (id, comment) => $http.post('/users/' + id + '/comments', comment).then(response => response.data), }; }]); Usando localhost:4000 , quiero invocar una función dentro de un controlador en mi back-end desde Frontend. ¿Como hacer eso?