<commit_before># drupal-ddp
Drupal and Meteor integration over DDP

# Methods
Creates a server method to handle pushing node (insert, update, delete) data from Drupal into mongo database.

# TODO
Manage pushing changes made in Meteor to the Drupal installation.<commit_msg>Updated README with basic setup instructions.<commit_after># drupal-ddp
Drupal and Meteor integration over DDP

# Methods
Creates a server method to handle pushing node (insert, update, delete) data from Drupal into mongo database.

# TODO
Manage pushing changes made in Meteor to the Drupal installation.


#Setting Drupal DDP on Drupal Site.#

Once you have a working Drupal site going:

### Download Module ###
`cd` to `sites/all/modules` and run `git clone --branch 7.x-1.x http://git.drupal.org/sandbox/bfodeke/2354859.git`. This will download the drupal_ddp module to you Drupal site.

### Install Node Dependencies ###
`cd` to the newly downloaded module folder (`sites/all/modules/drupal_ddp`) and run `npm install`.

### Run NodeServer ###
While in the drupal_ddp module folder, run `node ddp.js`

### Enable Module ###
Navigate to the *Modules* page in Drupal and enable the module. (http://yourdrupalsite.dev/admin/modules).

### Configure Drupal DDP ###
*Navigate to Drupal DDP Settings page to configure settings* (http://yourdrupalsite.dev/admin/config/development/ddp-connect)
- Specify `Drupal DDP node server URL`
- Specify `Meteor app URL`
- Select which content types you want to use with Drupal DDP.

### Create content ###
Creating content that has been selected for use with DDP will pass a json encoded node object over to your meteor app.
{'fraction_non_alphanumeric': 0.08623853211009175, 'fraction_numerical': 0.005504587155963303, 'mean_word_length': 4.5646258503401365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3448362', 'n_tokens_mistral': 479, 'n_tokens_neox': 473, 'n_words': 212}