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

206
Views
How to point all node js microservices in single port locally and consume it in react app

In my React and node application, the is microservice architecture on the server side which is written in node.js, all the microservices are running different ports like

http://localhost:3001, 
http://localhost:3002 

so on..,

I want to point all the services in a single port so that I can consume that services in react through only one single URL as a base path. want to do this on a local server/ local system. As I want to run the application end to end on the local server.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try to use an API GATEWAY with a Message Broker (rabbitmq for example) and in your service in index.js just consume the Queue of message broker. before send the response to the msg broker and This message are consume by your gateway

about 4 years ago · Juan Pablo Isaza Report

0

do you perhaps mean something like this? you put this into the .env file

CONNECTION_URL = 'put your db url '
SECRET=...
BASE_URL='http://localhost:3000/'
NODE_ENV=env

as for front you can just call your functions by link example

 const getItem= () => {
    Axios.get("http://localhost:5000/Items").then((response) => {
      setListItem(response.data);
    });
  };
about 4 years ago · Juan Pablo Isaza Report
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!