Ramesh Pareek
Ramesh Pareek

Reputation: 1669

why can't i use node.js on shared server?

I'm sure to the experts I will sound like a noob... very new to node.js. One of the thing I've just learnt is that I can start a basic server with something like this..

var http = require("http");

http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.write("Hello World");
  response.end();
}).listen(8888);

now i can access on cli with

$ node the-above-code.js

why can't the same be achieved on a shared server e.g. godaddy? What are the conceptual problems in that?

Upvotes: 1

Views: 148

Answers (1)

Handonam
Handonam

Reputation: 618

The problem is that godaddy doesn't let you change the apache settings to let you bind to port 8888. You would have to get yourself a private server to do that.

Refer to this thread: Why node.js can't run on shared hosting?

Upvotes: 1

Related Questions