<commit_before># ws-router
Simple websocket server to route traffic from one host to another.

Container
=========
docker pull pfigs/ws-router


Setup
=====
Start by installing the necessary modules with::

> npm install

There are two environment variables that you can define to change the server behavior, SERVE_AT and SERVE_HTTPS.

SERVE_AT : Port where https or http server will be located
SERVE_HTTPS: Starts https server instead of http (requires key and ceritificate)

Launch the process by::

> node app.js

Routing data
============
The point of this simple server is to /push data to all the clients that have /subscribed to the service.

If you want to receive data, point each host to::

> ws://<server_ip>:<server_port>/subscribe

For the host pushing data, send its messages to::
 
> ws://<server_ip>:<server_port>/push

Messages arriving at */push* will be forwarded to all clients.

Credits
=======
<NAME>
<commit_msg>updated README on how to use the docker image<commit_after># ws-router
Simple websocket server to route traffic from one host to another.

Container
=========
Fetch the image with

> docker pull pfigs/ws-router

Start the container as

> docker run -d --name ws-router -p 3000:3000 ws-router

Setup
=====
Start by installing the necessary modules with::

> npm install

There are two environment variables that you can define to change the server behavior, SERVE_AT and SERVE_HTTPS.

SERVE_AT : Port where https or http server will be located
SERVE_HTTPS: Starts https server instead of http (requires key and ceritificate)

Launch the process by::

> node app.js

Routing data
============
The point of this simple server is to /push data to all the clients that have /subscribed to the service.

If you want to receive data, point each host to::

> ws://<server_ip>:<server_port>/subscribe

For the host pushing data, send its messages to::
 
> ws://<server_ip>:<server_port>/push

Messages arriving at */push* will be forwarded to all clients.

Credits
=======
<NAME>

{'fraction_non_alphanumeric': 0.09322033898305085, 'fraction_numerical': 0.003988035892323031, 'mean_word_length': 4.409703504043127, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, 'https://': 0, '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': '5944711', 'n_tokens_mistral': 593, 'n_tokens_neox': 558, 'n_words': 276}