I am new in node.js I am just trying to make a simple node js server that works fine on my localhost. This is the "Hello World Example":
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8080);
console.log('Server running at http://localshot:8080/');
On my localhost works fine, I execute the node command on my console and I got the "Hello World" message.
Then, I create a Bitnami VM on Azure following this tutorial
I upload the files to the server using SFTP and I enter into the VM console remotly using a SSH connection. (I already install node.js on the VM)
ssh bitnami@100.101.102.103
But when I try to deploy the same node operation on my CloudService in Azure I got no answer, and apparently the server works becouse it prints the console.log message, but I cant access throw the internet. How do I access to my result on the internet? I try two different ways:
Using the azure link
http://myAppName.cloudapp.net:8080
Using the VM IP
http://12.34.567.890:8080
And I get no answer
How can I acces the server throw the internet? or what did I make wrong? Maybe I need to change the settings on the Azure Portal in order to see the port?
Thanks
If you have install the node js on your server and you are also getting the console.log message then might be you need to enable the port on your cloud server .I already did on aws server and I enable "Custom TCP port" 8080 for 0.0.0.0/0 for the ELB to access port 8080 on my instance. The "HTTP" Rule is Port 80 only.