I am new to node.js. I just installed node.js on my production server it was installed correctly and node.js is running on my putty cli the problem is I cannot access it on my browser. I think my problem is because I installed created my server on a subdirectory inside a subdomain e.g. subdomain.example.com here is my code
var http = require('http');
//create a server object:
http.createServer(function (req, res) {
res.write('Hello World!'); //write a response to the client
res.end(); //end the response
}).listen(3000); //the server object listens on port 8080
Now I am trying to access the node.js server by going to this address subdomain.example.com:3000 but I am getting no results. Please help Thanks!
via user3177305
No comments:
Post a Comment