Closed (fixed)
Project:
Node.js integration
Version:
7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 May 2012 at 10:36 UTC
Updated:
28 Aug 2012 at 15:41 UTC
Jump to comment: Most recent
Comments
Comment #1
adammaloneThere are a few specific things that aren't detailed in the README that could be added to either that or a doco page. I'd be willing to do a quick write up that echoed the way I got nodejs working.
Comment #2
bhosmer commentedMe too. I found some outdated information and would like a place for us to contribute our docs other than just the issue que.
Comment #3
spax commentedPerhaps you all would be so nice as to add your documentation here in the meantime to help people like me who need help now. =)
Comment #4
broncomania commentedSpecially the mistakes which already collected here should be mentioned for an easy installation. This will defenitly help new people to get an ahhhhhhh feeling. Its a liitle bit tricky to set it up.
Comment #5
Anonymous (not verified) commenteddone, i've added a page in on d.o. and added a link to it on the node.js project page.
https://drupal.org/node/1713530
it's just a cut and paste of readme.txt, but it is now a place we can work.
edits welcome!
Comment #6
bhosmer commentedThanks man!
Comment #7
spax commentedAnd I'm a complete noob who's never built from source on Ubuntu, so I would appreciate extreme detail if possible!
Comment #8
bhosmer commentedIf I remember correctly, when I installed it on Ubuntu it wasn't that hard. There was a versioning problem that I had with socket.io though and I had to manually specify a version other than the latest. When I get a chance, I will go through an install again and see if anything has changed.
Comment #9
bhosmer commentedThis was from May of 2012 when I tried my install:
I needed to specify the versions of express and connect. I believe node and npm are in apt so you shouldn't need to build them from source at all. Use apt-get install node npm
npm install socket.io
npm install request
npm --node-version=0.4.12 install express@2.4.3
npm --node-version=0.4.12 install connect@1.1.4
I'm adding it here for @spax, and after I verify if it is still needed, I will update the documentation page as well.
Comment #10
spineless commentedThe instructions to install nodejs I feel are ok but i am having issues with the last two items. Installing npm and running server.js
When I attempted to use the instructions provided by bhosmer I noticed that my system did not have socket.io or the request modules. I was able to follow the commands outlined and install express and connect as well.
But when I attempted to start the server using the command node server.js I did not get very far.
The system stops at:
Started http server.
info - socket.io started
I am thinking there is something wrong with my config file. I tried using the example config as well as creating the file using the module config builder tool but this error is persistent. Can you please provide your config file as an example?
Thanks,
spineless
Comment #11
adammaloneThis is the useable (ie not commented) part of my config file
Note, I have changed my service key for security:
There's nothing wrong with stopping where your did after you started it. My only recommendation would be for you to set debug: true as I have done and then navigate around the site (perhaps try to send a broadcast to all message from the nodejs notifications module). Watch your terminal for nodejs debug messages and your watchdog log. If you're getting errors somewhere ping them back here!
Comment #12
spineless commentedThanks for your help. Telling me to test by broadcasting a message was very helpful. I was able to see a message in my ssh terminal.
So I guess nodejs must be working.
One thing I noticed about the setup that should be mentioned in the document is that the install should be the administrator. SUDO authorization is required.
Comment #13
adammaloneCorrect. node and forever (another package installed via npm to make a node server into a service [starts it again automatically if it crashes etc]) are best installed with the global flag
npm install -g nodewhich does, as you say ,require root.Comment #14
spax commentedThanks bhosmer, I'll let you know once I get around to trying an install.
Comment #15
bhosmer commented@spax since I'm not really much of a javascript guy, I found the nodejs irc channel fairly helpful with most node specific stuff. That is where I learned about specifying a particular version with npm.