Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Accessing Express through angular

Do we need proxypass to access express back end from angular front end when using 2 separate ports in 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),
            };
        }]);

Using localhost:4000 I want to invoke a function within a controller in my back-end from Frontend. How to do that?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!