# dataserve-client

> Client to connect to dataserve using the redis protocol

Latest version **1.0.4** (published 2018-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install dataserve-client
pnpm add dataserve-client
yarn add dataserve-client
bun add dataserve-client
```

## 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.0.4 |
| Published | 2018-02-09 |
| First published | 2018-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 17.4 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | kdeegan |
| Maintainers | kdeegan |
| Keywords | dataserve, client, redis |

## Links

- npm: https://www.npmjs.com/package/dataserve-client
- Repository: https://github.com/dataserve/js-client
- Issues: https://github.com/dataserve/js-client/issues
- npm.io page: https://npm.io/package/dataserve-client

## Dependencies (4)

- [uuid](https://npm.io/package/uuid.md) ^3.2.1
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [redis](https://npm.io/package/redis.md) ^2.8.0
- [microtime](https://npm.io/package/microtime.md) ^2.1.7

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2018-02-09
- 1.0.3 — 2018-01-23
- 1.0.2 — 2018-01-10
- 1.0.1 — 2018-01-10
- 1.0.0 — 2018-01-09
- 0.0.1 — 2018-01-09

## README

Client to connect to dataserve using the redis protocol

## Installation
```
npm install dataserve-client
```

## Usage

```js
const { init: dsInit, ds } = require('dataserve-client');

/**
 * @param {Object} redisOpt    options for require('redis').createClient(redisOpt): tcp/unix socket, port, etc
 * @param {Object} Promise     (optional) Promise library to use
 * @param {Object} fullDebug   (optional) output payload when DEBUG=dataserve-client is enabled
 */
dsInit({ path: '/var/run/dataserve.sock' }, require('bluebird'), true);

ds('add', 'user', { name: 'Joe', 'email': 'joe@joe.com', password: 'hunter2' });

// Dataserve command
DS_ADD user {"name":"Joe", "email":"joe@joe.com","password":"hunter2"}

// Debug outputs
2018-01-08T23:53:53.436Z dataserve-client add SUCCESS [ 'user', '{"name":"Joe","email":"joe@joe.com","password":"hunter2"}' ] {"status":true,"result":null,"meta":{}} 0.012563
```

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