<commit_before># zmq-prebuilt &nbsp;&nbsp;[![Build Status](https://travis-ci.org/nteract/zmq-prebuilt.png)](https://travis-ci.org/nteract/zmq-prebuilt) &nbsp;[![Build status](https://ci.appveyor.com/api/projects/status/6u7saauir2msxpou?svg=true)](https://ci.appveyor.com/project/rgbkrk/zmq-prebuilt)

[ØMQ](http://www.zeromq.org/) bindings for node.js.

## Installation

    $ npm install zmq-prebuilt

We rely on [`prebuild`](https://github.com/mafintosh/prebuild). Prepare to be amazed at the wonders of binaries.

## Developer Installation

To set up `zmq-prebuilt` for development, clone and fork this repository. If you are running on Linux
or OS X, you will need to have `automake`, `autoconf`, and `libtools`. These can be installed using `brew`.

```
$ ./build_libzmq.sh
$ npm install
```

You can run then run the test suite.

```
$ npm test
```

Or run some of the example applications.

```
$ node examples/subber.js
```

### Supported operating systems

* [X] OS X/Darwin 64-bit
* [X] Linux 64-bit
* [ ] Windows (we'll get this one up soon, we're so close.)

## Usage

Everywhere you used `require(zmq)` in your code base before, replace it with `zmq-prebuilt`.

## Examples

### Push/Pull

```js
// producer.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('push');

sock.bindSync('tcp://127.0.0.1:3000');
console.log('Producer bound to port 3000');

setInterval(function(){
  console.log('sending work');
  sock.send('some work');
}, 500);
```

```js
// worker.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('pull');

sock.connect('tcp://127.0.0.1:3000');
console.log('Worker connected to port 3000');

sock.on('message', function(msg){
  console.log('work: %s', msg.toString());
});
```

### Pub/Sub

```js
// pubber.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('pub');

sock.bindSync('tcp://127.0.0.1:3000');
console.log('Publisher bound to port 3000');

setInterval(function(){
  console.log('sending a multipart message envelope');
  sock.send(['kitty cats', 'meow!']);
}, 500);
```

```js
// subber.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('sub');

sock.connect('tcp://127.0.0.1:3000');
sock.subscribe('kitty cats');
console.log('Subscriber connected to port 3000');

sock.on('message', function(topic, message) {
  console.log('received a message related to:', topic, 'containing message:', message);
});
```

## Release

After an `npm` release, go through the following to create the actual prebuilds:

### Shipping Linux binaries

```
docker build -t zmqprebuilt .
docker run -it zmqprebuilt prebuild --all -u $GITHUB_TOKEN
```

### Shipping OS X binaries

From a Mac:

```
npm install
npm install -g prebuild
prebuild --all -u $GITHUB_TOKEN
```

### Shipping Windows binaries

TODO<commit_msg>Include build script in OS X release instructions<commit_after># zmq-prebuilt &nbsp;&nbsp;[![Build Status](https://travis-ci.org/nteract/zmq-prebuilt.png)](https://travis-ci.org/nteract/zmq-prebuilt) &nbsp;[![Build status](https://ci.appveyor.com/api/projects/status/6u7saauir2msxpou?svg=true)](https://ci.appveyor.com/project/rgbkrk/zmq-prebuilt)

[ØMQ](http://www.zeromq.org/) bindings for node.js.

## Installation

    $ npm install zmq-prebuilt

We rely on [`prebuild`](https://github.com/mafintosh/prebuild). Prepare to be amazed at the wonders of binaries.

## Developer Installation

To set up `zmq-prebuilt` for development, clone and fork this repository. If you are running on Linux
or OS X, you will need to have `automake`, `autoconf`, and `libtools`. These can be installed using `brew`.

```
$ ./build_libzmq.sh
$ npm install
```

You can run then run the test suite.

```
$ npm test
```

Or run some of the example applications.

```
$ node examples/subber.js
```

### Supported operating systems

* [X] OS X/Darwin 64-bit
* [X] Linux 64-bit
* [ ] Windows (we'll get this one up soon, we're so close.)

## Usage

Everywhere you used `require(zmq)` in your code base before, replace it with `zmq-prebuilt`.

## Examples

### Push/Pull

```js
// producer.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('push');

sock.bindSync('tcp://127.0.0.1:3000');
console.log('Producer bound to port 3000');

setInterval(function(){
  console.log('sending work');
  sock.send('some work');
}, 500);
```

```js
// worker.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('pull');

sock.connect('tcp://127.0.0.1:3000');
console.log('Worker connected to port 3000');

sock.on('message', function(msg){
  console.log('work: %s', msg.toString());
});
```

### Pub/Sub

```js
// pubber.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('pub');

sock.bindSync('tcp://127.0.0.1:3000');
console.log('Publisher bound to port 3000');

setInterval(function(){
  console.log('sending a multipart message envelope');
  sock.send(['kitty cats', 'meow!']);
}, 500);
```

```js
// subber.js
var zmq = require('zmq-prebuilt')
  , sock = zmq.socket('sub');

sock.connect('tcp://127.0.0.1:3000');
sock.subscribe('kitty cats');
console.log('Subscriber connected to port 3000');

sock.on('message', function(topic, message) {
  console.log('received a message related to:', topic, 'containing message:', message);
});
```

## Release

After an `npm` release, go through the following to create the actual prebuilds:

### Shipping Linux binaries

```
docker build -t zmqprebuilt .
docker run -it zmqprebuilt prebuild --all -u $GITHUB_TOKEN
```

### Shipping OS X binaries

From a Mac:

```
./build_libzmq.sh
npm install
npm install -g prebuild
prebuild --all -u $GITHUB_TOKEN
```

### Shipping Windows binaries

TODO
{'fraction_non_alphanumeric': 0.17751161959242046, 'fraction_numerical': 0.02466928852341795, 'mean_word_length': 4.390173410404624, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7671855', 'n_tokens_mistral': 2119, 'n_tokens_neox': 1932, 'n_words': 527}