1.2.1 • Published 5 years ago

@heatmap/rpc v1.2.1

Weekly downloads
5
License
MIT
Repository
-
Last release
5 years ago

RPC

Build Status

RPC over RabbitMQ for Node.js

Examples

Example usage of Server:

import { Server } from "@heatmap/rpc";
const server = new Server(connection);
server.addCommand("hello", (name: string) => `Hello, ${name}!`);
await server.start();

Example usage of Client:

import { Client } from "@heatmap/rpc";
const client = new Client(connection, { requestsQueue });
await client.start();
const response = await client.sendCommand("hello", ["Dante"]);
console.log(`Dante got hello reponse ${response}`);

Acknowledgements

This module was originally a fork of elasticio/amqp-rpc but has now been completely rewritten for TypeScript usage.

License

This module is licensed under the MIT license.

1.2.1

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago