After several tentatives this beginner ask for master tips from anyone who can spend a bit of its time.

My Drupal Server is LAMP. That's an AWS EC2 EBS instance running regularly. I have installed after a long searching NODE V.0.6.12, and I could run "Hello Word" on my port 8080 from outside.

But If I select method node.js for Drupalchat, nothing happens. I am sure It is my fault once I am completely confuse while configuring nodejs.config.js.

My main doubts are:

1. Which http addresses should I use for both nodejs and backend servers ? (localhost, 127.0.0.1, 145.34.233.23 (public IP - ficticious), or example.com )
2. Should it have something inside directory publish or at least should the address /nodejs/publish exist ?
3. What is the right way of configuring the path of socket.io?
4. Is the nodejs server started by Drupal or I have to create something to start the server? I have started manually "node server.js" inside "/path/to/sites/all/modules/nodejs/". It started to show up messages when I logged out from drupal site, but nothing else. Chat never shows a single user available for communication.

PS: It works with AJAX and Long Polling methods but sometimes starts to repeat same messages several times, mainly with overlay or more than one screen open on the browser.

That's my latest tentative...

/**
* This configuration file was built using the 'Node.js server configuration builder'.
* For a more fully commented example see the file nodejs.config.js.example in the root of this module
*/
backendSettings = {
  "scheme":"http",
  "host":"127.0.0.1",
  "port":8080,
  "key":"/path/to/key/file",
  "cert":"/path/to/cert/file",
  "resource":"/sites/all/modules/nodejs/node_modules/socket.io",
  "publishUrl":"/sites/all/modules/nodejs/publish",
  "serviceKey":"45#4rtyuUUiw23445",
  "backend":{
  "port":80,
  "host":"example.com",
  "messagePath":"/nodejs/message"},
  "clientsCanWriteToChannels":false,
  "clientsCanWriteToClients":false,
  "extensions":"",
  "debug":false,
  "transports":["websocket",
  "flashsocket",
  "htmlfile",
  "xhr-polling",
  "jsonp-polling"],
  "jsMinification":true,
  "jsEtag":true,
  "logLevel":1};

Tks.

Comments

alexpsfti’s picture

I would like to know this as well, im stuck like you. Hello world also works here. About ip (127.0.0.1) i think it should be yoursite.com, because the client browser connect to this adress.

carnau’s picture

First of all, did you configured the Nodejs and Nodejs Config module for Drupal?

1. BackendSettings is your nodejs server and backend your Drupal site. You can use different ips/fqdn if your services are in separate servers. 127.0.0.1, 145.34.233.23 (public IP - ficticious), or example.com works well, I never used localhost but I think it will work.

2. The nodejs/publish is created by server.js when you start nodejs server with "node server.js". You don't need to nothing more.

3. Use the right path in the form provided by Nodejs config module. Just this. You can test it putting the url generated in a browser.

4. You have to create a script to start it. There are some public available, just search it using google.

darklrd’s picture

Status: Active » Postponed (maintainer needs more info)
spineless’s picture

You might find this useful.

https://drupal.org/node/1561020

spineless’s picture

Issue summary: View changes

nothing important