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

167
Vistas
React-app frontend & express backend using nginx on ubuntu

I have been searching google for a couple of hours, been through multiple pages, and watching youtube videos but I am simply not able to find any guidance towards what to do in my case.

I have a react-app frontend running on Nginx. With the frontend react-app I am running some Axios requests, example:

await axios.post("http://localhost:5000/api/getMessages", {});

I then have my express server receiving the requests and sending back responses, example:

app.post('/api/getMessages', (req, res) => {
    Messages.find().sort('-createdAt').limit(10)
        .then((result) => {
            res.send(result)
        })
})

Everything works fine in my local environment, but I am unsure of what to do when putting it on a live server with a domain using Nginx. I am able to get the react-app up and working just fine, but when making an axios request it simply returns net::ERR_CONNECTION_REFUSED

This is with my express server running in the back like a normal node project.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You must add rule for your server's ufw.

Ufw rule adding

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