Node.js/Socket.io hosting

2,215 views
Skip to first unread message

senikk

unread,
Mar 10, 2012, 4:26:01 AM3/10/12
to Socket.IO
What is the best hosting solution for socket.io/node.js?

Martin Wawrusch

unread,
Mar 10, 2012, 5:05:29 AM3/10/12
to sock...@googlegroups.com
Nodejitsu.com

Karthik Thayyil

unread,
Mar 10, 2012, 6:46:47 AM3/10/12
to sock...@googlegroups.com
atlast successfully installed socket.io :P :D

 now i could start wit proramming :)

Joe Developer

unread,
Mar 10, 2012, 8:33:59 AM3/10/12
to sock...@googlegroups.com


On Sat, Mar 10, 2012 at 5:05 PM, Martin Wawrusch <mar...@wawrusch.com> wrote:
Nodejitsu.com

What makes it the best in your opinion?

Martin Wawrusch

unread,
Mar 10, 2012, 8:52:17 AM3/10/12
to sock...@googlegroups.com
Combination of culture and technical understanding and the right size. For me they are similar to how heroku was for ruby before they got purchased by salesforce. They live and breathe node.js, whereas most of the others (heroku, vmware, microsoft and even joyent) have to balance multiple offerings. Nodester is a bit too small, but that will hopefully change. From a technical perspective (we are running a couple of instances on nodejitsu for months now) I am very impressed. Zero downtime so far, and a good API (we make extensive use of it).

senikk

unread,
Mar 10, 2012, 8:02:33 AM3/10/12
to Socket.IO
To bad almost every of the nodejs hosting solutions is invite only.
I'm going to speak on a HTML5 meeting 21.3 so I hoped I could have the
app hosted on one of the nodejs hostings. But if I can't get one in
time I think I have to reorganize one of my static ip on my VPS or in
worst case just host it from my laptop.

Jose Luis Rivas

unread,
Mar 10, 2012, 10:06:23 AM3/10/12
to sock...@googlegroups.com
On 03/10/2012 08:32 AM, senikk wrote:
> To bad almost every of the nodejs hosting solutions is invite only.
> I'm going to speak on a HTML5 meeting 21.3 so I hoped I could have the
> app hosted on one of the nodejs hostings. But if I can't get one in
> time I think I have to reorganize one of my static ip on my VPS or in
> worst case just host it from my laptop.

Host it on your VPS with a Reverse-Proxy. Like NGINX. I'm doing that.

NGINX + forever (a tool from nodejitsu, btw).

--
Jose Luis Rivas, Web Builder
Eserre -- http://www.eserre.com/
Venezuela - GPGs: 7C4DF50D B9AC8C43

Martin Wawrusch

unread,
Mar 10, 2012, 9:55:29 AM3/10/12
to sock...@googlegroups.com
hop onto the freenode channel #nodejitsu and ask one of the admins there. You should have access in no time.

Marak Squires

unread,
Jul 11, 2012, 3:31:02 AM7/11/12
to sock...@googlegroups.com
If you type:

   jitsu install socket.io

you will be prompted to install and start socket.io app for node.js

You can then type:

   jitsu deploy

if you want to deploy.


On Tue, Jul 10, 2012 at 3:26 PM, Shekhar Suman <shekhars...@gmail.com> wrote:
Can you please help to install a socket.io app on node.js??

Marak Squires

unread,
Jul 11, 2012, 4:03:53 AM7/11/12
to sock...@googlegroups.com
Running:

jitsu install socket.io

will create a folder on your local harddrive with a sample socket.io application and correctly formatted package.json.

On Wed, Jul 11, 2012 at 12:58 AM, Shekhar Suman <shekhars...@gmail.com> wrote:
Thank a lot!!! I have one more question -- I want to deploy a simple chat app on nodejitsu. I have two files -- "client.html" and "server.js". What should be the package.json file to deploy the app on nodejitsu. I added the line 
 "dependencies": {
    "socket.io": "0.9.6"
 },

I successfully deployed the app on nodejitsu but when I run it in the browser nothing happens. It should prompt me for a username. It works fine locally.

Marak Squires

unread,
Jul 11, 2012, 4:35:30 AM7/11/12
to sock...@googlegroups.com
I just tried the exact same process here and it worked.

Maybe you caught some bad luck / didn't wait long enough.

I'd just try again.

On Wed, Jul 11, 2012 at 1:26 AM, Shekhar Suman <shekhars...@gmail.com> wrote:
My package.json file looks like this ------->
{
  "name": "nodeapps-socket.io",
  "author": {
    "name": "Nodejitsu Inc.",
    "email": "sup...@nodejitsu.com"
  },
  "scripts": {
    "start": "./bin/server.js"
  },
  "version": "0.1.0-1",
  "dependencies": {
    "socket.io": "v0.8.x",
    "express": "v2.5.x"
  },
  "subdomain": "chat-awesome-ss",
  "analyze": false,
  "devDependencies": {},
  "optionalDependencies": {},
  "engines": {
    "node": "v0.6.x"
  },
  "dist": {
    "shasum": "03503b0a27a0e47ce60bea5c874243f074974056"
  }
}

I then type jitsu deploy. Everything works fine until this line shows up on command prompt -- 
info:    Starting app nodeapps-socket.io

and then it's stuck there.

What the command prompt shows ---
C:\Users\Shekhar\myapp\socket.io>jitsu deploy
info:    Welcome to Nodejitsu shekharsuman
info:    It worked if it ends with Nodejitsu ok
info:    Executing command deploy
info:    Skipping require-analyzer because noanalyze option is set
info:    Skipping require-analyzer because noanalyze option is set
warn:    Local version appears to be old
warn:    Your package.json version will be incremented for you automatically
warn:    About to write C:\Users\Shekhar\myapp\socket.io\package.json
data:
data:    {
data:        dist: { shasum: '03503b0a27a0e47ce60bea5c874243f074974056' },
data:        name: 'nodeapps-socket.io',
data:        version: '0.1.0-2',
data:        subdomain: 'chat-awesome-ss',
data:        analyze: false,
data:        optionalDependencies: {},
data:        engines: { node: 'v0.6.x' },
data:        scripts: { start: './bin/server.js' },
data:        author: { name: 'Nodejitsu Inc.', email: 'sup...@nodejitsu.com' },

data:        dependencies: { express: 'v2.5.x', socket.io: 'v0.8.x' },
data:        devDependencies: {}
data:    }
data:
prompt: Is this ok?: (yes)
info:    Creating snapshot 0.1.0-2
info:    Updating app nodeapps-socket.io
info:    Activating snapshot 0.1.0-2 for nodeapps-socket.io
info:    Starting app nodeapps-socket.io

Shekhar Suman

unread,
Jul 11, 2012, 4:38:28 AM7/11/12
to sock...@googlegroups.com
Okay. But it's still stuck after 5 minutes.
Anyways thanks for your help. :)

Marak Squires

unread,
Jul 11, 2012, 4:45:55 AM7/11/12
to sock...@googlegroups.com
If you still can't figure it out try sup...@nodejitsu.com or the #nodejitsu room on irc.freenode.net

Shekhar Suman

unread,
Jul 11, 2012, 7:23:16 AM7/11/12
to sock...@googlegroups.com
After a lot of time I get this ----
error:   Error running command deploy
error:   socket hang up
error:   Error: socket hang up
error:       at createHangUpError (http.js:1253:15)
error:       at Socket.socketOnEnd [as onend] (http.js:1341:23)
error:       at TCP.onread (net.js:419:26)
info:    Nodejitsu not ok

Marak Squires

unread,
Jul 11, 2012, 7:33:45 AM7/11/12
to sock...@googlegroups.com
Did you make any modifications to the boilerplate application that was installed?

Are you trying to listen on port 80?

If you need more help email sup...@nodejitsu.com or visit #nodejitsu in irc.freenode.net.

Shekhar Suman

unread,
Jul 11, 2012, 7:40:37 AM7/11/12
to sock...@googlegroups.com
No. I didn't make any modifications on boilerplate applications. I'm trying to deploy a simple chat application.
And YES I'm trying to listen on port 80. 

Marak Squires

unread,
Jul 11, 2012, 7:42:57 AM7/11/12
to sock...@googlegroups.com
The boilerplate application attempts to listen on port 8080 by default, so if you are listening on port 80 you've made a modification.

Change it back to 8080 and try jitsu deploy

Shekhar Suman

unread,
Jul 11, 2012, 7:44:25 AM7/11/12
to sock...@googlegroups.com
Ok....let me try this.

Marak Squires

unread,
Jul 11, 2012, 7:45:16 AM7/11/12
to sock...@googlegroups.com
I'm going to sleep. If you want support for Nodejitsu, email sup...@nodejitsu.com.

Shekhar Suman

unread,
Jul 11, 2012, 7:51:57 AM7/11/12
to sock...@googlegroups.com
Thanks a lot. I have successfully deployed the app. But it doesn't work correctly. It should prompt me for a name. But all I see is a blank page.

Tony Brown

unread,
Jul 11, 2012, 7:52:47 AM7/11/12
to sock...@googlegroups.com
send a link so we can see the code
--
Sincerely, 

Tony Brown

Available for work


Shekhar Suman

unread,
Jul 11, 2012, 11:54:53 AM7/11/12
to sock...@googlegroups.com
I have attached the files.
project.zip

Tony Brown

unread,
Jul 11, 2012, 12:02:01 PM7/11/12
to sock...@googlegroups.com
Cheers!

Shekhar Suman

unread,
Jul 11, 2012, 12:44:16 PM7/11/12
to sock...@googlegroups.com
I have finally got it working. I just changed the line in the html file 

var socket = io.connect('http://localhost:8080/', {secure: false}); 
to
var socket = io.connect('http://chat-ss-1.jit.su:80/', {secure: false});

where "chat-ss-1" is subdomain as defined in package.json.

But a new problem has arised. While it works perfectly in IE there is no response in Chrome and Firefox. What may be the possible error?

Shekhar Suman

unread,
Jul 11, 2012, 1:17:31 PM7/11/12
to sock...@googlegroups.com
I tried all the transport methods. None of them seem to work on Chrome and Firefox.

 I had the same problem while running the files locally (runs on IE and not on Firefox & Chrome) but on adding these lines
io.configure('development', function(){
  io.set('transports', ['xhr-polling']);
});
in my server.js file, the app started working on all the browsers. I wonder why it is not working on nodejitsu.

Shekhar Suman

unread,
Jul 12, 2012, 1:10:42 AM7/12/12
to sock...@googlegroups.com
Got it. Changed 'development' to 'production' and voila.
Reply all
Reply to author
Forward
0 new messages