I am developing on an Ubuntu server that I do not have. This is my first node application.
Node.js is installed on the server. I created a simple server file:
Server.js
var http = require("http");
http.createServer(function (request, response){
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello sof');
console.log('request processed\n');
}).listen(1234);
console.log("Server Running on 1234");
In putty, I start the server with this command:
node Server.js
In another putty instance, I ran this command:
curl http://my.url.website.ca:1234/*curl request*/
In the putty instance where I ran the curl command, I get this output:
Hi sof
In the putty instance where I started the node server, this is printed on the screen:
request processed
So it looks like the server is running. However, when I put http://my.url.website.ca:1234 in my browser, I get this error:
GET http://my.url.website.ca:1234/ net :: ERR_CONNECTION_TIMED_OUT
, .
- - - ? ?