node.js - Cannot Connection to Port at Simple Node Js server -


i stumped.

i have node js server running on subdomain.

every time try access browser err_connection_refused error.

here server code

const http = require('http');  http.createserver( function (request, response){   response.writehead(200, {'content-type': 'text/plain'});   response.end('hello world\n'); }).listen(8124, "my-server-ip");  console.log('server running @ http://127.0.0.1:8124/'); 

additional information: running vps hostgator. subdomain shares ip main domain; 412.x.xx.xxx .

insert console log inside create server function. can identify error this. can use error response.

const http = require('http');  http.createserver( function (request, response){    response.writehead(200, {'content-type': 'text/plain'});   response.end('hello world\n');   console.log('server running @ http://127.0.0.1:8124/');  }).listen(8124, "my-server-ip"); 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -