Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
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 answers
Answer question

0

You must add rule for your server's ufw.

Ufw rule adding

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!