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

142
Visualizações
Multi-tenant React Application - Tenant Specific Configuration

I am building a multi-tenant React application where the customers will be able to download the application files and run the application in their environment. It is essentially a single application deployed in customer infrastructure (which is not in our control). I am using create-react-app.

What I am struggling with is to find a way wherein each customer can specify configuration parameters based on their environment. For example, let's say there is a parameter in my application called ApiEndpoint. Now this will vary for each customer as they will be hosting the API in their environment as well. How can a customer specify a value for this parameter for their environment that can be read by the application?

At first I thought that I would be able to make use of environment variables where each customer will be able to create a .env file and have my application read from that. However when I read the documentation, I realized that it will not work as .env file gets included in the bundle itself.

Another thought I have is to create a configuration file (say app.config) in the root of the deployed web application. Customers will be able to provide configuration specific to their environment in that file and when my application loads, I will read the contents of this file and populate my application variables accordingly.

I think the configuration file solution will work. However I am curious to know how other folks are solving this problem.

about 4 years ago · Juan Pablo Isaza
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