I have running CentOs and put my app into Default folder.
I can access files through http://myCentOSIP/ and it works.
I can run "$npm start" in bash, and run my node.js application locally. But I can't access that app using http:// request from other computer
I've added in my main "server.js" file:
http.createServer(app).listen(8080);
and it works but only locally.. but still not on others machines
What I need is just simple access my app from other IP outside CentOs using http request
I've also tried:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8080, 5050);
where 5050 is my localhost:5050 app prot. And this also failed.
via Krzysztof Skorupski
No comments:
Post a Comment