codeigniter nodejs and nowjs integration
I am trying to integrate nodejs and nowjs with codeigniter framework, As I dont have time to rewrite the whole site I want to check if a user is logged in. I am using ion_auth and I am storing the session in db. Client js: var session_id = $.cookie('sc_session'); $("form").submit(function() { now.distributeMessage($("textarea").val(),session_id); }); now.receiveMessage = function(message){ $("body").append("<br>" + message); }; Heres the nodejs server code: EDIT :* Simplified it a little, and get session cookie from client js * everyone.now.distributeMessage = function(message,session_cookie)