Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

143
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda