I have a log nodejs backend code here and it runs on port 8080.
process.env.PORT = 8080 in the environment varisbles.
var port = process.env.PORT;
app.listen(port, ()=> {
console.log("Port is", port);
})
It connects to the databse as I see the output in the log file :
Port is 8080
I get an error in the log file with the following.
/var/log/nginx/error.log
----------------------------------------
connect() failed (111: Connection refused) while connecting to upstream, client: 777.77.7.777, server: , request: "GET / HTTP/1.1", upstream: "http://111.1.1.1:8080/", host: "666.66.66.666"
Does anyone know why it errors? Should the host: be my elastic beanstalk url by any chance?
If you need any additinal info let me know!