# cds-rpc

> rpc power by cds

Latest version **0.0.5** (published 2017-03-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install cds-rpc
pnpm add cds-rpc
yarn add cds-rpc
bun add cds-rpc
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-03-13 |
| First published | 2017-03-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | iamee |
| Maintainers | cavacn |
| Keywords | rpc, cds |

## Links

- npm: https://www.npmjs.com/package/cds-rpc
- Repository: https://github.com/TuRing-CDS/cds-rpc
- Homepage: https://github.com/TuRing-CDS/cds-rpc#readme
- Issues: https://github.com/TuRing-CDS/cds-rpc/issues
- npm.io page: https://npm.io/package/cds-rpc

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^2.6.1
- [thrift](https://npm.io/package/thrift.md) ^0.10.0

## Recent versions

- 0.0.5 (latest) — 2017-03-13
- 0.0.4 — 2017-03-07
- 0.0.3 — 2017-03-07
- 0.0.2 — 2017-03-07
- 0.0.1 — 2017-03-06

## README

## TuRing-CDS

### cds-rpc

    npm install cds-rpc --save
    
### Server Example

    'use strict'
    const Server = require('cds-rpc').Server;
    
    const server = new Server(9000, 'localhost', {
        isEncrypt: true,
        aesKey: '1jhcueygghxahgio'
    });
    
    server.on('error', console.error)
    
    server.start(async function (request) {
        return [request];
    });
    
    
### Client Example

    'use strict'
    const Client = require('cds-rpc').Client;
    
    const client = new Client(9000, 'localhost', {
        isEncrypt: true,
        aesKey: '1jhcueygghxahgio'
    });
    
    client.on('error', (err) => {
        console.log('==>', err);
    });
    
    client.invoke('GET', '/user/home', {uname: 'hello'}, {body: 'bodyData'}, {ext: 'extData'}).then((result) => {
        console.log(result);
        client.close();
    }, function (err) {
        console.log(err.message, err.stack, err.status);
    });

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