# drpcjs

> Apache storm DRPC client for Node.js

Latest version **1.1.1** (published 2020-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install drpcjs
pnpm add drpcjs
yarn add drpcjs
bun add drpcjs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2020-07-19 |
| First published | 2018-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 230.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Napoleon Oikonomou |
| Maintainers | iamnapo |
| Keywords | drpc, drpcjs, node-drpc, storm, storm-node |

## Links

- npm: https://www.npmjs.com/package/drpcjs
- Repository: https://github.com/iamnapo/drpcjs
- Homepage: https://github.com/iamnapo/drpcjs#readme
- Issues: https://github.com/iamnapo/drpcjs/issues
- npm.io page: https://npm.io/package/drpcjs

## Dependencies (1)

- [node-int64](https://npm.io/package/node-int64.md) ^0.4.0

## Recent versions

- 1.1.1 (latest) — 2020-07-19
- 1.1.0 — 2020-05-19
- 1.0.1 — 2020-01-31
- 1.0.0 — 2019-09-15
- 0.1.0 — 2018-12-13

## README

# drpcjs

> Apache storm DRPC client for Node.js

[![build](https://img.shields.io/github/workflow/status/iamnapo/drpcjs/ci?style=for-the-badge&logo=github&label=)](https://github.com/iamnapo/drpcjs/actions) [![npm](https://img.shields.io/npm/v/drpcjs.svg?style=for-the-badge&logo=npm&label=)](https://www.npmjs.com/package/drpcjs)
[![license](https://img.shields.io/github/license/iamnapo/drpcjs.svg?style=for-the-badge)](./LICENSE)

## Install

```console
$ npm i drpcjs
```

## Usage

```javascript
const Drpcjs = require("drpcjs");
const drpc = new Drpcjs(options);
```

### **options**

- `host`: drpc cluster hostname
- `port`: drpc client port, default to 3772
- `timeout`: TCP connection timeout time, default to null
- `keepAlive`: keep connect alive, default to true
- `maxConnectCounts`: the maximum connect counts, if the param `keepAlive` is
  set true, client will reconnect to storm until the connect counts exceed the maxConnectCounts.

### **events**

- `error`
- `close`
- `connect`
- `timeout`

### **methods**

```javascript
execute(topologyName, JSON.stringify(args));
```

## Example

```javascript
const drpcjs = require('drpcjs');
const drpc = new drpcjs({ host: '127.0.0.1' });

drpc.execute('reach', JSON.stringify({ a: 'a', b: 7, c: true }).then(console.log).catch(console.error);
```

## Acknowledgements

Based on [`node-drpc`](https://github.com/rkatti/node-drpc).

---
_Source: https://npm.io/package/drpcjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
