videlalvaro / thanksgiving

Demo nodejs app that consumes the Instagram Api
Other
2 stars 0 forks source link

Tune SockJS settings for cloudfoundry #1

Open majek opened 11 years ago

majek commented 11 years ago
diff --git a/app.js b/app.js
index af72773..4564068 100644
--- a/app.js
+++ b/app.js
@@ -42,7 +42,9 @@ var server = http.createServer(app);

 broadcast.installHandlers(server, {
     prefix: '/broadcast', 
-    sockjs_url: '/javascripts/sockjs-0.3.js' 
+    sockjs_url: '/javascripts/sockjs-0.3.js',
+    websocket: false,
+    jsessionid: true
 });

 server.listen(app.get('port'), function(){

1) CF doesn't do websockets - it's no point in clients trying them (ie: let server advertise not to use native websockets) 2) In order to scale sockjs on CF one needs to use transports that support cookies (specially: one need to set JSESSIONID cookie). This will disable some non-cookie transports like XDR.

videlalvaro commented 11 years ago

Where's the Pull Request :P

videlalvaro commented 11 years ago

I tried both changes and it crashed. So I'm not sure which of those makes it crash.