I ran some node.js tests on my windows machine and everything worked well. Now I installed node on my debian remote machine, and Im trying to run a simple http server:
var http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}).listen(8888);
I execute using SSH: node server.js Now when I go to my server ip http://xxx.xxx.22.127:8888 the server times out.
What am I doing wrong? I tested with some simpler scripts and node.js appears to be installed properly. Can it be a firewall issue, or maybe I should add a host-ip or sommit?
Side question: when I run node server.js in putty i cant type anymore, how do I return to the commandline? :)
EDIT: My iptables info
Chain INPUT (policy ACCEPT)
target prot opt source destination
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:5900
ACCEPT tcp -- anywhere anywhere tcp dpt:8888
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere