Jump to content
Sign in to follow this  
S1eym

How to use Socket.io application via ssh when uploaded on a server

Recommended Posts

I have created the websocket chat example which is on socket.io, and i have been successful with it. i can run it on the local machine by pointing the browser to localhost:3000 after running the .js file from node.

I now want to run this on a real server. I have transferred the relevant files using filezilla onto the server, and i am using Putty to run the .js file.

When i type in node index.js into the putty program to run the .js file; it says listening on *:3000.

I do not know where to point my browser to for this application to work...I have tried many different URL's such as the computers IP address followed by :3000 etc without any luck

Does anyone have any ideas on where to point the browser to?

Thank You

Share this post


Link to post
Share on other sites

Hey Sleym

First of all I would double check that you are definitely using your server's public IP address - one nice and easy way to get this is using dig from the command line:

[ricky@localhost ~]$ dig +short myip.opendns.com @resolver1.opendns.com.
213.106.96.160

And then if that's correct - I would check that port 3000 is open in your machine's firewall (I don't know what operating system you're using so I won't over-advise here). I am a familiar with RHEL/CentOS 6/7 so if you're using one of those I'll probably be able to help.

Good luck!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By AblazeRich2
      i'm building a wordpress site for a friend and we need either free or cheap hosting. So far they all seem to have some kind of draw back (like being down for 1 hour a day, or not being able to use your own domain name with it).
      Can any of you recommend a free web hosting service that actually has no major drawbacks for a simple brochure style website?
      Or a really cheap one. I've been checking out these guys: http://www.go4hosting.com/uk/shared-hosting.htm
      and they say they are less than a buck a month. GoDaddy is $4 and many other companies are coming in at 3-4 bucks a month. Anyone have any experience with them?
      Thoughts?
       
       
    • By ve3oat
      Newbie here.
       
      I am unsure about which sub-directories of the home directory of my website need password protection. My hosting service provides the following sub-directories (I haven't added any yet) :
      /bin
      /etc
      /logs
      /mail
      /php
      /public_ftp
      /public_html
      /ssl
      /tmp
       
      I assume (oh-oh) that all of them, except the 2 public directories and the ssl one, should be password protected, but don't know if I am on the right track here.
       
      Your guidance would be welcomed. Thanks.
      ... Martin
       
       
    • By ohdude
      best people, I'm stuck with the following problem.

      I am working on a web site (before I had a problem with the css), but now I do not get charged the rest of the page
       
      I can not scroll down further than this.
       
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <META NAME="Keywords" CONTENT="Pureflex, cms, online, html, php"> <META NAME="Generator" CONTENT="t"> <META NAME="Author" CONTENT="Daan"> <META NAME="Generator" CONTENT="Pureflex"> <META HTTP-EQUIV="Content-Language" CONTENT="en-us"> <META NAME="Designer" CONTENT="Daan"> <META NAME="Publisher" CONTENT="Daan"> <META NAME="Revisit-After" CONTENT="10 Days"> <META NAME="Distribution" CONTENT="Global"> <META NAME="Robots" CONTENT="Index"> <META NAME="MSSmartTagsPreventParsing" CONTENT="True"> <META HTTP-EQUIV="Pragma" CONTENT="No-Cache"> <META HTTP-EQUIV="Creation-Date" CONTENT="27-6-2014"> <META HTTP-EQUIV="Version" CONTENT="v1.0"> <META NAME="Owner" CONTENT="Us"> <META NAME="Rating" CONTENT="General"> <META HTTP-EQUIV="Content-Type" CONTENT="Informational"> <META HTTP-EQUIV="Content-Script-Type" CONTENT="text/php"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <META HTTP-EQUIV="Document-Type" CONTENT="Web Page"> <META HTTP-EQUIV="Document-Class" CONTENT="Completed"> <META HTTP-EQUIV="Document-Rights" CONTENT="Copyrighted Work"> <script src="//use.edgefonts.net/bebas-neue.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="style/stylesheet.css"/> <script src="//tinymce.cachefly.net/4.1/tinymce.min.js"></script> <script> tinymce.init({selector:'textarea'}); </script> <TITLE>THE ANTI CUPCAKE MOVEMENT</TITLE> </head> <body> <div class="menu"> <a href="logout.php">LOGOUT</a> <a href="contact.php">BOTHER US| </a> <a href="main.php">THE ANTICUPCAKE MAN| </a> </br> </div> <p> </p> <p><br /> </p> <div id="logo"></div><a href="/" class="Cupcake">THE ANTI CUPCAKE MOVEMENT</a> </div> <BR> <div class="Showpost">Bier<BR></div><div class="Reposts"><BR><p>Re:Bier<BR></p>Lolo;lolldsaokdjioidoajisdoa<BR><BR> (Bier) - Daan<BR> <left> <hr size=3 width="33%" align=left> <BR><p>Re:Bier<BR></p><img src="http://www.picturesnew.com/media/images/image-background.jpg"/><BR><BR> (Bier) - Devian<BR> <left> <hr size=3 width="33%" align=left> </div> </body> </html> @charset "utf-8"; /* CSS Document */ a{ text-decoration:none; color:black; font-family:"bebas-neue, sans-serif"; float:right; margin-right:4px; }a:hover{ text-decoration:underline; } .Cupcake{ /* class */ text-decoration:none; color:black; font-family:"Courier New", Courier, monospace; float:left; font-size:30px; } .Cupcake:hover{ text-decoration:none; } #logo{ height:140px; width:140px; background: url(/workspace/Theanticupcakeproject/website/images/Chocolate-Orange-Cupcake-icon.png) no-repeat center; float:left; } p{ font-family:"Courier New", Courier, monospace; color:black; }.footer{ font-family:"Courier New", Courier, monospace; color:black; float:right; }.Tropic{ text-decoration:none; color:black; font-family:"bebas-neue, sans-serif"; float:left; margin-right:4px; font-size:12px; }.Tropic:hover{ text-decoration:underline; color:purple; font-family:"bebas-neue, sans-serif"; float:left; margin-right:4px; font-size:12px; }table{ float:left; border:1px solid black }.editor-my{ position: fixed; top: 300px; left: 10px; right: 200px; }.TropicTable{ position: fixed; top: 300px; left: 10px; right: 200px; }.TropicDate:hover{ text-decoration:underline; color:red; font-family:"bebas-neue, sans-serif"; float:left; margin-right:4px; font-size:12px; }.TropicDate{ text-decoration:none; color:black; font-family:"bebas-neue, sans-serif"; float:left; margin-right:4px; font-size:12px; }.Showpost{ position: fixed; top: 300px; left: 10px; right: 200px; text-decoration:none; color:black; font-family:"bebas-neue, sans-serif"; float:left; margin-right:4px; font-size:30px; }.Reposts{ position: fixed; top: 320px; left: 10px; right: 400px; text-decoration:none; color:black; font-family:"bebas-neue, sans-serif"; float:left; margin-right:4px; font-size:20px; }  
       


       
    • By Weedy101
      As a hobbyist my setup is rather basic, and my knowledge of how to configure it is even more basic.
       
      I am using IIS7 for my localhost on a win 7 ultimate 64 laptop. Last night as i logged off microsoft updates automatically installed. This evening before I logged in the updates finished installing and then rebooted my laptop. When I went to use my localhost all I could get was the Server '\' Application error 401.2 access denied.
       
      I have been in touch with Microsoft support and they led my round a merry chase but solved nothing. They are telling me to call a premium rate phone number for specialist support with IIS configuration.
       
      Having checked the update history, within this batch of updates there were 5 .net framework security updates and I believe that it is one or more of these that is causing my problem. Microsoft support just disconnected the service rather than look into this issue properly and gave me no help what so ever, (which I will blog about later). They didn't even put things back as they found them and it took me ages to get my laptop to reboot properly!
       
      My problem is that with so little knowledge of the IIS configuration I can't get my localhost working again and thus cannot do anything with my websites I 'play with' for my hobby.
       
      Can anybody help me with this configuration issue please, speaking in layman's terms will be essential.
    • By whereskob
      Hi all,
       
      Would really appreciate some help on something thats causing me a lot of problems!
       
      I have a hosting server (editionsuk.com) and many domains that are using a fordwarding url to subdomains of the main server address
       
      I am realising now that forwardng url's are not the correct process as they come up in google as both address, and when you paste the forwarding url onto facebook it doesnt come up with correct thumbnail or descrption
       
      is it just a matter of transferring the domain over to the hosting company (at a fee) or can i acheive this properly with namservers?
       
      Thanks for the help guys
       
      Kob
  • Recently Browsing

    No registered users viewing this page.

  • Member Statistics

    • Total Members
      57,548
    • Most Online
      4,970

    Newest Member
    FredsHead
    Joined
  • Forum Statistics

    • Total Topics
      65,738
    • Total Posts
      455,458
×