0

I am following the Nodejs integration documentation to set up Chatroom, but am a little confused.

In step 2, do we cd to the folder of nodejs installation, or the drupal nodejs module?

Also, what is the server.js file?

1

3 Answers 3

1

Updated the documentation page.

In step 2, we need to move in to nodejs module folder inside your drupal's sites directory. Install the dependencies using package manager(npm). Most probably the nodejs module is installed at sites/all/modules/nodejs.

Also don't get confused by these notation (path/to/your/nodejs/module/directory). It used to say that it exist in some directory.

server.js holds the code related to your express application from configuring your app to starting your app. Express will be installed in your node_modules folder when you install the dependencies. node_modules will be created in you nodejs module(drupal site).

node server.js starts the express application from the location where server.js file is present.

Also you can follow the tutorial links provided by No Sssweat.

1
1

As pointed out by Neograph734 in the answer, the current Node.js integration documentation is outdated, and the working instructions for setting up the node.js server with Drupal is in the Node.js Integration readme.txt file.

First, npm install drupal-node.js, and then run node app.js in the drupal-node.js folder, where app.js replaces the old server.js in the current Node.js Integration documentattion.

0

In step 2, do we cd to the folder of nodejs installation, or the drupal nodejs module?

In the drupal nodejs module (cd /sites/all/modules/nodejs then node server.js)

Here is an installation video tutorial for Drupal 7

Here is an installation video tutorial for Drupal 8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.