<commit_before>Hookforward
===========
Hookforward allows you to forward webhooks from an external provider to an app running on your local machine without having to expose ports.

You need a publicly accessible CouchDB server that your webhook provider can post to. On your local machine, you run a simple program that listens for new webhook docs in CouchDB and forwards them to the url of your dev server.

I used this setup to develop an app that receives [Stripe](https://stripe.com/) webhooks. Nice to be able to run the app on my local machine and have the whole moustrap work.

FYI, Stripe recommends you use [Localtunnel](http://progrium.com/localtunnel/), which works ok (via voodoo I don't understand), but because they recycle urls frequenly, my app was receiving webhooks from various oddball services that the url was previously used for. Creepy.


One-time setup
--------------

1. Get a publicly accessible CouchDB server (free plans available from [IrisCouch](http://www.iriscouch.com/) and [Cloudant](https://cloudant.com/))

2. Run the ```hookforward push``` command with your desired DB url, e.g.:
```
hookforward push https://user:pass@myname.cloudant.com/hooks
```
This will create the DB if it doesn't already exist, and push a design doc with a hook capture update function.

3. Set 2 will output the hook capture url for your DB. Configure your webhook provider to post hooks to this url for development/testing.
<commit_msg>README tweak<commit_after>Hookforward
===========
Hookforward allows you to forward webhooks from an external provider to an app running on your local machine without having to expose ports.

You need a publicly accessible CouchDB server that your webhook provider can post to. On your local machine, you run a simple program that listens for new webhook docs in CouchDB and forwards them to the url of your dev server.

I used this setup to develop an app that receives [Stripe](https://stripe.com/) webhooks. Nice to be able to run the app on my local machine and have the whole moustrap work.

This is an alternative to using a service like [Localtunnel](http://progrium.com/localtunnel/). Localtunnel works ok (via voodoo I don't understand), but because they recycle urls frequenly, my app was receiving webhooks from various oddball services that the url was previously used for. Creepy.


One-time setup
--------------

1. Get a publicly accessible CouchDB server (free plans available from [IrisCouch](http://www.iriscouch.com/) and [Cloudant](https://cloudant.com/))

2. Run the ```hookforward push``` command with your desired DB url, e.g.:
```
hookforward push https://user:pass@myname.cloudant.com/hooks
```
This will create the DB if it doesn't already exist, and push a design doc with a hook capture update function.

3. Set 2 will output the hook capture url for your DB. Configure your webhook provider to post hooks to this url for development/testing.

{'fraction_non_alphanumeric': 0.07976720301266689, 'fraction_numerical': 0.0027387880862718246, 'mean_word_length': 4.264864864864865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5743652', 'n_tokens_mistral': 774, 'n_tokens_neox': 761, 'n_words': 421}