NodeJSChat

Categories

Component ID

1321064

Component name

NodeJSChat

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

A simple node js group chat using the Now Js package. Yes I know about the Node JS integration module but it's currently in a state of flux and I need to get something working sooner than later. I hope to learn more about node js and perhaps contribute to the more robust Node JS Integration module.

Assumptions

  1. You have a node js instance running on same server as apache (and another port) or on another server
  2. You have installed the now js package for node js ($ npm install now)
  3. You copy chat.js to the node server and run it with $ node chat.js or $ sudo node chat.js
  4. You edit line 12 of the module nodejs and change the uri:port from 'http://10.8.28.245:8081' to wherever your node js instance lives. Yes I know this should go into a settings form and user variable_set and variable_get - I will do that as soon as I can.
  5. Change line 6 of chat.js to the port you want node js to listen on currenly defaults to 8081