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

234
Vistas
Automically set ip address of axios.post in react

I am using a load balancer and have several django projects running behind the load balancer. Therefore, the IP address of the axios.post and axios.get should be different depending on the local machine IP address in where the Django project is running.

The below works fine for using it on a single machine

I have a .env file with

REACT_APP_AXIOS_URL=http://127.0.0.1
console.log(process.env.REACT_APP_AXIOS_URL)
axios.post(`${process.env.REACT_APP_AXIOS_URL}`)

However, I would like that REACT_APP_AXIOS_URL to be fetched automatically instead of hardcoding it since there will be 10 machines behind the load balancer. How can I do that?

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