<commit_before>[WIP]

# Localhook

A simple tool to receive http/https webhook notifications for development purpose.

This tool simplify web developments while using API using webhooks.

1) Install the [server application](https://github.com/lucascherifi/localhook-server) at https://yourdomain.com

2) Configure a new webhook on the server

- go to https://yourdomain.com/admin (default auth: admin / admin)
- Type a webhook path, ex : `webhook_1`
- Store somewhere the generated private key.

3) Install, configure and run the client:

- Install:
```bash
composer global require lucascherifi/localhook-client
```
- Start the client:
```bash
localhook run
```
At first run, you'll be prompt for the server URL and a private key watching a webhook you created.

# when prompted, enter the private and a local endpoint to call, i.e. "http://localhost:8080/notifications"

The client will now redirect all notifications received at https://yourdomain.com/webhook_1 to http://localhost:8080/notifications<commit_msg>update doc<commit_after>[WIP]

# Localhook

A simple tool to receive http/https webhook notifications for development purpose.

This tool simplify web developments while using API using webhooks.

1) Install the [server application](https://github.com/lucascherifi/localhook-server) at https://yourdomain.com

2) Configure a new webhook on the server

- go to https://yourdomain.com/admin (default auth: admin / admin)
- Type a webhook path, ex : `webhook_1`
- Store somewhere the generated private key.

3) Install, configure and run the client:

- Install:
```bash
composer global require lucascherifi/localhook-client
```
- Start the client:
```bash
localhook run
```
At first run, you'll be prompt for:
- The server Socket IO URL, i.e.: `http://yourdomain.com:1337`
- A private key watching a webhook you created, i.e. `webhook_1`
- A local URL to call for each notification, i.e. "http://localhost/notifications"

The client will now redirect all notifications, as this example :

    POST https://yourdomain.com/webhook_1 ==> POST http://localhost/notifications
{'fraction_non_alphanumeric': 0.09514656415185008, 'fraction_numerical': 0.011052378664103796, 'mean_word_length': 4.493403693931398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '2291850', 'n_tokens_mistral': 619, 'n_tokens_neox': 585, 'n_words': 244}