I faced problem with the recent update. There is no server.js file in the module folder. My site is c:/wamp/www/testsite and module directory of nodejs is - c:/wamp/www/testsite/sites/all modules
Now, since so many things have changed in the recent nodejs module structure, I am having a hard time in configuring it properly so that node.js could integrate with my testsite properly.
I did as per readme guidelines:
1. Install drupal-node.js packge with npm: npm install drupal-node.js (Make sure to do this outside of your Drupal modules directory)
Hence I did it in mytestsite/sites directory - which created a folder - node_modules/drupal-node.js inside which there are many files and folders including another node_modules folder containing modules like express, request, socket.io etc.
2. Point Drupal at the Node.js server process, either using the configuration page or settings.php.
I opted to use the configuration page, visited '/admin/config/nodejs/settings', and entered
the appropriate values.

backendSettings = {
"scheme":"http",
"host":"localhost",
"port":8080,
"key":"/path/to/key/file",
"cert":"/path/to/cert/file",
"resource":"/socket.io",
"publishUrl":"publish",
"serviceKey":"",
"backend":{
"port":80,
"host":"localhost",
"messagePath":"/testsite/nodejs/message"},
"clientsCanWriteToChannels":true,
"clientsCanWriteToClients":true,
"extensions":[],
"debug":true,
"transports":["websocket", "polling"],
"jsMinification":true,
"jsEtag":true,
"logLevel":1};

After that I opened node.js command prompt and cd to c:\wamp\www\testsite\sites\node_modules\drupal-node.js
and typed - node app.js which started - http server - but threw many errors also like invalid login for uid undefined.
What step did I miss? What is right configuration ? There must be some proper guidelines to do so. Please help.

Comments

ManuAdam created an issue.

glekli’s picture

The Node.js application is no longer bundled with the module. I have added some notes about this to the project page to lessen the confusion.

What are the exact errors you got?

The "invalid login for uid" error means nodejs cannot authenticate the user agains the Drupal site. Assuming the user was valid and logged in, this can happen when the service key is invalid. The "serviceKey" is empty in your config file - I'm not sure if you just removed it here or if it's actually empty in your config file. Make sure that the "serviceKey" entry in your config file matches the one you entered on the Drupal config page.