Installing and configuring Node.js on Ubuntu 12.04 for localhost and external multi-site Drupal installations

First, get the pre-requsite packages:

sudo apt-get install build-essential g++ libssl-dev curl git

Then, install the Python Software Properties package:

sudo apt-get install python-software-properties

Add the repository for node.js:

sudo apt-add-repository ppa:chris-lea/node.js

Run updates:

sudo apt-get update

Install Node.js and Node Package Manager:

sudo apt-get install nodejs npm

If you need or want to compile Node C++ modules, then install nodejs-dev:

sudo apt-get install nodejs-dev

Installing Sourcemint and Cloud9 is highly recommended if you want to make your own Node.js modules.

On Ubuntu and other Linux systems, make sure that the libxml2-dev package is installed, or the installation of Cloud9 will fail:

sudo apt-get install libxml2-dev

Ensure that Sourcemint is installed globally:

npm install -g sm

Then, install Cloud9 with Sourcemint:

sm clone --dev https://github.com/ajaxorg/cloud9/tree/master cloud9

Or, install Cloud9 with Sourcemint after git cloning Cloud9 (you must have git installed and properly configured on your system, but you probably should have git anyways *smiley face*):

Git clone Cloud9:

git clone https://github.com/ajaxorg/cloud9.git cloud9

Switch to the Cloud9 clone directory:

cd cloud9

Use Sourcemint install in the Cloud9 clone directory:

sm install

Assuming that you already have a Drupal multi-site installation on the machine, you need to create a site-specific copy of the Drupal nodejs module folder. Typically in a multi-site installation, all contributed modules (like nodejs) are placed in the sites/all/modules folder. But, since you need a separate instance of nodejs.config.js and server.js for each site, copy the nodejs modules folder into a new modules folder in site, at /sites/[YourSiteName]/modules/nodejs. This new modules folder will live next to the files folder for each site.

Switch into the site folder for the site that you want to use nodejs with:

cd /var/www/drupal/sites/[YourSiteName]

Make a new modules directory, assuming you don't have other site-specific modules for this site already:

mkdir modules

Get a copy of the nodejs module and unpack it in the site-specific modules folder. Drush is probably the easiest, assuming you have it set up, or you can also wget. Remember to check the nodejs module page to get the link to the latest stable version.

Switch into the site-specific modules directory:

cd modules

Download the nodejs module tarball:

wget http://ftp.drupal.org/files/projects/nodejs-7.x-1.0.tar.gz[/prettify]

Unpack the tarball:

tar -xvzf nodejs-7.x-1.0.tar.gz

And, delete the tarball:

sudo rm nodejs-7.x-1.0.tar.gz

Then, switch into the new nodejs folder for the site:

cd nodejs

Now it starts to get exciting. In the new nodejs module folder, you need to install npm (for each and every site). This must be done in the site-specific nodejs module folder at /sites/[YourSiteName]/modules/nodejs, because the packages.json file must be present. Make sure you are in the site-specific nodejs module folder, and:

npm install

In the module folder, you will see many files, but you are only really concerned with one, nodejs.config.js.example, at this time. Go ahead and make a copy of it for your actual usage:

cp nodejs.config.js.example nodejs.config.js

Edit the nodejs.config.js file to work for your site. At the time of writing, there were several extra lines in the example config file that seemed to be actually preventing server.js from starting, so make sure that you have everything exact, or you won't get any love from server.js.

sudo nano nodejs.config.js

The default example file, below the commented instructions, is currently filled with the following:

settings = {
  scheme: 'http',
  port: 8080,
  host: 'localhost',
  resource: '/socket.io',
  serviceKey: '',
  backend: {
    port: 80,
    host: 'drupalhost',
    scheme: 'http',
    basePath: '',
    messagePath: '/nodejs/message'
  },
   debug: false,
   sslKeyPath: '',
   sslCertPath: '',
   baseAuthPath: '/nodejs/',
   publishUrl: 'publish',
   kickUserUrl: 'user/kick/:uid',
   logoutUserUrl: 'user/logout/:authtoken',
   addUserToChannelUrl: 'user/channel/add/:channel/:uid',
   removeUserFromChannelUrl: 'user/channel/remove/:channel/:uid',
   addChannelUrl: 'channel/add/:channel',
   removeChannelUrl: 'channel/remove/:channel',
   setUserPresenceListUrl: 'user/presence-list/:uid/:uidList',
   addAuthTokenToChannelUrl: 'authtoken/channel/add/:channel/:uid',
   removeAuthTokenFromChannelUrl: 'authtoken/channel/remove/:channel/:uid',
   toggleDebugUrl: 'debug/toggle',
   contentTokenUrl: 'content/token',
   publishMessageToContentChannelUrl: 'content/token/message',
   extensions: [],
   clientsCanWriteToChannels: false,
   clientsCanWriteToClients: false,
   transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'],
   jsMinification: true,
   jsEtag: true,
   logLevel: 1
};

But, I was having a lot of trouble getting server.js started, and noticed that the module configuration utility did not include many of these lines. After removing the lines I had much greater success:

   kickUserUrl: 'user/kick/:uid',
   logoutUserUrl: 'user/logout/:authtoken',
   addUserToChannelUrl: 'user/channel/add/:channel/:uid',
   removeUserFromChannelUrl: 'user/channel/remove/:channel/:uid',
   addChannelUrl: 'channel/add/:channel',
   removeChannelUrl: 'channel/remove/:channel',
   setUserPresenceListUrl: 'user/presence-list/:uid/:uidList',
   addAuthTokenToChannelUrl: 'authtoken/channel/add/:channel/:uid',
   removeAuthTokenFromChannelUrl: 'authtoken/channel/remove/:channel/:uid',
   toggleDebugUrl: 'debug/toggle',
   contentTokenUrl: 'content/token',
   publishMessageToContentChannelUrl: 'content/token/message',

In the end, you want it to look like this, with the local network IP address of your server ('localhost' didn't seem to work for me, nor did the local loopback, 127.0.0.1):

settings = {
  scheme: 'http',
  port: 8181,
  host: '192.168.1.10',
  resource: '/socket.io',
  serviceKey: 'YourServiceKey',
  backend: {
    port: 80,
    host: 'yoursitename.com',
    scheme: 'http',
    basePath: '',
    messagePath: '/nodejs/message'
  },
   debug: false,
   sslKeyPath: '',
   sslCertPath: '',
   baseAuthPath: '/nodejs/',
   publishUrl: 'publish',
   extensions: [],
   clientsCanWriteToChannels: false,
   clientsCanWriteToClients: false,
   transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'],
   jsMinification: true,
   jsEtag: true,
   logLevel: 1
};

A couple of notes.

  • 'resource' is definitely '/socket.io'
  • 'baseAuthPath is definitely '/nodejs/'
  • publishUrl is definitely 'publish' (not 'nodejs/publish' as specified by the config utility)

If you use a service key, then add to your site's settings.php file:

/**
 * Node.js service key:
 *
 */
$conf['nodejs_service_key'] = 'YourServiceKey';

After getting your nodejs.config.js file edited, start the nodejs instance by running in the site-specific module folder:

node server.js

Bonus: DrupalChat integration:

Copy the server extension out of the DrupalChat module folder:

sudo cp /var/www/drupal/sites/all/modules/drupalchat/drupalchat_nodejs/drupalchat_nodejs.server.extension.js /var/www/drupal/sites/[YourSiteName]/modules/nodejs/drupalchat_nodejs.server.extension.js

Add the extension to the nodejs.config.js file:

extensions: ['drupalchat_nodejs.server.extension.js']

Drupal version: 
Modules: 
Audience: 

Comments

maryland judical case search kurspivcuons

смотреть секс чат russian-videochats

[img]https://i.ibb.co/G2VgYYY/1.jpg[/img]

«РУССКИЙ ВИДЕОЧАТ»
Ежедневный число баров и стриптиз клубов, где танцуют лишь лишь топлес – растет. И, само собой, время, сколько проведено в таких вот заведениях, назвать потраченным впустую быстро никак нельзя.

Это прекрасное забава, и впоследствии работы заглянуть сюда вечер, дабы пропустить пару стаканчиков пивка и посмотреть для всех красоток, что так сладострастно изгибают свое тело на сцене, и присутствие этом с себя снимая всю одежду. Впрочем же, также имеется изрядно вовсе неприятных моментов. Во-первых, хозяева бара, чаще всего, ставят ради вход грабительскую плату, также сиречь и следовать однако остальное, включая и обязательные чаевые. Также немаловажно и то, сами танцовщицы клубов, ради которых, сообразно сути дела, и пришли, проявляют мало внимания, и это лишь, мягко говоря. Большая прием из них приходит из них в стриптиз клуб простой сидеть для того, дабы свести концы с концами, и потому вряд ли они наслаждаются по-настоящему своим ночным занятием.

Ныне же навеки есть прекрасная альтернатива дорогим клубам и барам. А именно эротическое вебкам шоу! Необходимо только чуть приходить на сайт, пройти простую регистрацию, и посмотреть онлайн прекрасный стриптиз, сидя быть всем этом в уютном кресле при любимого домашнего компьютера. Вы один согласитесь, сколько ведь намного приятнее, нежели шумная прокуренная снаряжение клуба. Это даже лучше всякий VIP комнаты и наиболее элитного клуба. Выключая того, вам не надо никуда ехать, и искать свободные места, точно бывает часто, потому, чистый надо только только включить компьютер и приходить для сайт. Но вот и для этом также решительно не заканчивается однако преимущество именно эротических видело чатов. Регистрация занимает только только скольконибудь минут, и открывается пред вами дверь в страну наиболее приятных переживаний, новых захватывающих ощущений, которые подарят вам ее жительницы.

[url=http://russian-videochats.ru/videochat-devochki/malchik-hochet-v-tambov-...секс в онлайне[/url]

michigan court cases search niqooszfdlzd

case serial number search wfevqqaitmol maryland judiciary case search <a href="https://jtbtigers.com/2wed9">maryland judiciary case search</a> ventura county case search <a href=http://vprd.me/Xq7f3>maryland judiciary case search</a> broward county case search
georgia case search <a href="http://bitly.kr/p7GMMnJknGJ">md court case search</a> maryland judiciary case search <a href=https://bogazicitente.com/2w8hu>maryland judiciary case search</a> maryland judiciary case search wmrluumwhnng maryland search case
dc court case search online <a href="http://due.im/short/0nzP">maryland judiciary case search</a> kern county court case search <a href=https://mupt.de/amz/qbs3>maryland judiciary case search</a> maryland judiciary case search

orange county ca superior court case search ymfmlpkinkiq

maryland judiciary case search xwrhhffofsff maryland judiciary case search <a href="https://vae.me/sFHh">maryland judiciary case search</a> san joaquin superior court case search <a href=http://wunkit.com/a9AYAA>montgomery county district court case search</a> maryland judiciary case search
maryland judiciary case search <a href="http://r.artscharity.org/Lz9r6">maryland judiciary case search</a> marin county case search <a href=http://xsle.net/2zf6b>maryland judiciary case search</a> maryland judiciary case search jjbbnnoxmzwd michigan judiciary case search
maryland judiciary case search <a href="https://s.coop/2g9un">maryland judiciary case search</a> dc courts case search <a href=http://r.artscharity.org/Ji9w7>washington dc court case search</a> maryland judiciary case search

maryland judiciary case search efusjaelhtqr

maryland judiciary case search qtpbthgthmbz maryland judiciary case search <a href="http://s.amgg.net/05fjb">maryland judiciary case search</a> search md court cases <a href=http://vprd.me/Zp9z5>maryland judiciary case search</a> google case law search
maryland judiciary case search <a href="https://mupt.de/amz/poc9">md public case search</a> delaware judiciary criminal case search <a href=https://vae.me/wJcN>maryland judiciary case search</a> los angeles family court case search bcblsqwwsjkv sangamon county circuit clerk case search
maryland judiciary case search <a href="https://xs.ke/XThp">maricopa case search</a> maryland judiciary case search <a href=https://mupt.de/amz/qbs3>maryland case search results</a> maryland judiciary case search

maryland judiciary case search nkapelcdmwfs

maryland judiciary case search rnmbnnbttrip maryland judiciary case search <a href="https://coupemoi.la/FURVa">maryland judiciary case search</a> broward court case search <a href=http://s.qurdo.com/3ali3>maryland judiciary case search</a> maryland judiciary case search
maryland judiciary case search <a href="https://bogazicitente.com/2uwv6">workers compensation case search</a> bombay high court case search <a href=https://links.wtf/tbXp>missouri case net people search</a> henry county court case search zhacqfnrrzri maryland judiciary case search
case search nj <a href="http://6i9.co/4sq2">prince william county circuit court case search</a> ky case search <a href=https://jtbtigers.com/2wezc>king county court cases search</a> maryland judiciary case search

this content tgvdypzqaago

url [url=https://bookmarkingworld.review/story.php?title=maryland-crook-history-c... loved this[/url] logan county case search <a href="http://unionisstrength.com/index.php?qa=user&qa_1=huff35gylling">home page</a>
illinois court case search [url=https://disqus.com/by/keller48harmon/]pasco county clerk of court case search[/url] pop over to this website <a href="https://www.postonlineads.com/user/profile/113655">my explanation</a>

indiana case search tnsspwsyowtk

marion county case search <a href=https://myemotion.faith/wiki/Maryland_Offender_History_Checks_for_a_PreE... dade county clerk of court case search</a> md case search <a href="https://manchesterclopedia.win/wiki/Maryland_Crook_Background_Checks_for... case search warrants</a>
more bonuses <a href=https://borchun.name/user/Gylling61Gylling/>hop over to this website</a> check out the post right here <a href="https://hauge59harmon.edublogs.org/2020/08/10/maryland-criminal-history-... to these guys</a>

ms judiciary case search nbgpawqaawyj

case search montgomery county eyttzuanhkwm palm beach case search <a href="https://1borsa.com/2ve08">maryland judiciary case search</a> maryland judiciary case search [url=https://links.wtf/nkmG]case.net missouri name search[/url] maryland judiciary case search
kane county circuit court case search <a href="http://www.linkbrdesk.net/url/000cw">va court case search</a> maryland judiciary case search [url=http://slnk.info/disfr]maryland judiciary case search[/url] maryland judiciary case search ovtdfawsdauw maryland judiciary case search
maryland judiciary case search <a href="https://1borsa.com/2vvpu">new york criminal court case search</a> nueces county criminal case search [url=http://www.linkbrdesk.net/url/00se5]kanawha county circuit court case search[/url] maryland judiciary case search

maryland judiciary case search aheiilpzpuji

case search broward tzgqpbyuoabz maryland judiciary case search <a href="http://freeurlredirect.com/31xzo">case no search</a> maryland judiciary case search <a href=http://www.linkbrdesk.net/url/0023g>maryland judiciary case search</a> case search pima county
maryland judiciary case search <a href="http://due.im/short/0oIp">maryland judiciary case search</a> arizona criminal case search <a href=https://links.wtf/GpCr>maryland judiciary case search</a> franklin county ohio case search nyiggloymwvv maryland inmate case search
maryland judiciary case search <a href="https://onlineuniversalwork.com/2zo0z">maryland judiciary case search</a> oscn.net case search <a href=https://shorturl.ac/6fabe>recent search and seizure cases</a> brevard county court case search

maryland judiciary case search qgvbhceojvxw

maryland judiciary case search szfwuxtsjmby orange county superior court case search <a href="https://shorturl.ac/6fsrm">oscn case search</a> maryland judiciary case search <a href=https://links.wtf/ADnr>clayton county case search</a> miami dade case search
maryland judiciary case search <a href="http://gongpo.moum.kr/nQpv">maryland judiciary case search</a> maryland judiciary case search <a href=https://shorturl.ac/6fbiz>maryland judiciary case search</a> nc case search dbecnrzqkdmx maryland judiciary case search
maryland judiciary case search <a href="http://vprd.me/Bo62L">criminal case number search</a> rock island county case search <a href=https://qspark.me/0ZQm5V>maryland judiciary case search</a> ohio courts case search

ИНТЕРНЕТ КАЗИНО РОЯЛЬ

ИНТЕРНЕТ КАЗИНО РОЯЛЬ ЛОТО В УКРАИНЕ ДЛЯ ОНЛАЙН ИГРЫ НА ГРИВНЫ
Онлайн казино Украины Рояль Лото для игры на гривны, которое демонстрирует все более многообещающие показатели. В украинских интернет клубах находят для себя отдушину многие любители азартых игр из стран СНГ.
https://www.google.co.nz/url?q=https://royalloto.com/

wayne county case search hyskagkvmrqq

md judiciary case search liejjjscmpxr kendall county case search <a href="https://xs.ke/DpER">maryland judiciary case search</a> pennsylvania judiciary case search name <a href=https://vrl.ir/ByDebY>wicomico county district court case search</a> maryland judiciary case search
maryland judiciary case search <a href="https://vrl.ir/4UrUtu">maryland judiciary case search</a> maryland judiciary case search <a href=http://gongpo.moum.kr/n5Cd>maryland case search codes</a> seattle district court case search kzorrssealiv inmate case search
maryland judiary case search <a href="https://vae.me/1vY0">maryland judiciary case search</a> maryland judiciary case search <a href=http://vprd.me/Fg2b4>georgia judiciary case search</a> supreme court case law search

ИНТЕРНЕТ КАЗИНО РОЯЛЬ

ИНТЕРНЕТ КАЗИНО РОЯЛЬ ЛОТО В УКРАИНЕ ДЛЯ ОНЛАЙН ИГРЫ НА ГРИВНЫ
Онлайн казино Украины Рояль Лото для игры на гривны, которое демонстрирует все более многообещающие показатели. В украинских интернет клубах находят для себя отдушину многие любители азартых игр из стран СНГ.
https://www.google.ro/url?q=https://royalloto.com/

ИНТЕРНЕТ КАЗИНО РОЯЛЬ

ИНТЕРНЕТ КАЗИНО РОЯЛЬ ЛОТО В УКРАИНЕ ДЛЯ ОНЛАЙН ИГРЫ НА ГРИВНЫ
Онлайн казино Украины Рояль Лото для игры на гривны, которое демонстрирует все более многообещающие показатели. В украинских интернет клубах находят для себя отдушину многие любители азартых игр из стран СНГ.
https://www.google.com.my/url?q=https://royalloto.com/

I like the valuable

I like the valuable information you provide in your articles. I will bookmark your weblog and check again here frequently. I'm quite certain I will learn many new stuff right here! Good luck for the next!

I like the valuable

I like the valuable information you provide in your articles. I will bookmark your weblog and check again here frequently. I'm quite certain I will learn many new stuff right here! Good luck for the next!

dc case search gyfmaueeepnx

his comment is here <a href=https://hauge85peck.webgarden.cz/rubriky/hauge85peck-s-blog/maryland-cri... case search</a> the original source <a href="http://schlucke.bplaced.net/kckk/member.php?action=profile&uid=769206">c... this link here now</a>
case search broward <a href=https://lovebookmark.date/story.php?title=maryland-bad-guy-background-ch... case search oklahoma</a> visit your url <a href="http://appdev.163.ca/dz163/home.php?mod=space&uid=2735608">virginia judiciary case search</a>

fairfax county circuit court case search camqbchexhdj

ct judicial case search qszvwjmedpdq maryland judiciary case search <a href="https://onlineuniversalwork.com/2zoxa">duval county clerk of court case search</a> judicial case search maryland <a href=https://s.coop/2gvz9>fairfax county court case search</a> maryland judiciary case search
maryland judiciary case search <a href="https://1borsa.com/2ve6b">case sensitive google search</a> maryland judiciary case search <a href=https://mupt.de/amz/poc9>broward county civil case search</a> search federal court cases ayfdnelgxiru maryland judiciary case search
montgomery county case search <a href="https://coupemoi.la/ARLGe">maryland judiciary case search</a> kane county case search <a href=https://qspark.me/E4YSDM>maryland judiciary case search</a> clark county justice court case search

Pages

Add new comment