auroqueue
auroqueue copied to clipboard
aws public IP
I use AWS EC2 but get failed to bind to public IP
1, I use default server.js it will bind to the private IP.
Test: telnet locahost 8000 ok
2, Now I want to bind the public IP. I modified the server.js as
server.connection({
port: parseInt(process.env.PORT, 10) || 8000,
host: '54.169.49.55',
routes: { log: true }
});
or modify the package.json as
"start": "HOST=54.169.49.55 PORT=8080 node server.js",
npm start shows
[email protected] start /home/ec2-user/auroqueue HOST=54.169.49.55 PORT=8080 node server.js 19/02/20 07:02:45, [log], data: Server started at: http://54.169.49.55:8080
Test: telnet 54.169.49.55 8080 , refuse connection, browser also refused