Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

213
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda