I need to implement Mobile Chat via node js having Drupal as backened for application.
Facing following issues while integrating nodejs integration module :
1. Every time I try to configure settings in nodejs integration module, site hangs up and it does not work at all untill I remove nodejs directory from root.
2. Is it possible to run Nodejs Server in a Separate Instance other than instance where drupal is deployed?
Since nodejs server needs more memory, I need to install it on separate server.
This is my config.js file settings look like:
backendSettings = {
"scheme":"http",
"host":"localhost",
"port":3000,
"key":"/path/to/key/file",
"cert":"/path/to/cert/file",
"resource":"/socket.io",
"publishUrl":"publish",
"serviceKey":"testing",
"backend":{
"port":80,
"host":"localhost",
"messagePath":"/drupal7/nodejs/message"},
"clientsCanWriteToChannels":true,
"clientsCanWriteToClients":true,
"extensions":"",
"debug":true,
"transports":["websocket",
"flashsocket",
"htmlfile",
"xhr-polling",
"polling"],
"jsMinification":true,
"jsEtag":true,
"logLevel":1
};
Comments
Comment #2
zjvillas CreditAttribution: zjvillas as a volunteer commentedwaiting for an answer on this question.
Comment #3
it_mohit CreditAttribution: it_mohit commented@zedrickvillas what your exact requirement do you need to setup nodejs server on separate instance if yes then copy nodejs.config.js, package.json, server.js from nodejs module folder add configuration to nodejs.config.js do npm install. Use forever or pm2 to run server.js
Comment #4
glekli CreditAttribution: glekli commentedYes, it is possible to run the node.js app separated from Drupal. In fact, this is the recommended way of doing it. If you run it from inside the Drupal docroot directory, the files installed by npm may cause issues.
Note that as of the latest release, the Node.js app no longer ships with the Drupal module. You can download it from Github or by using npm. Please see README.txt for details.