https://github.com/horse-framework/horse-client-js
NodeJS Client for Horse Messaging Server
https://github.com/horse-framework/horse-client-js
Last synced: 8 months ago
JSON representation
NodeJS Client for Horse Messaging Server
- Host: GitHub
- URL: https://github.com/horse-framework/horse-client-js
- Owner: horse-framework
- License: apache-2.0
- Created: 2022-10-13T08:16:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-13T22:03:35.000Z (over 3 years ago)
- Last Synced: 2025-02-16T18:39:51.599Z (over 1 year ago)
- Language: TypeScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# horse-client-js
NodeJS Client for Horse Messaging Server
### Installation ###
```
npm i horse-client-js
```
### Sample Usage ###
```js
import { HorseClient } from './horse-client';
let client = new HorseClient();
client.addRemoteHost('horse://localhost:15400');
client.onlog.subscribe(log => {
console.log('LOG: ' + log);
});
client.queue.subscribe('queue-name')
.subscribe(context => {
console.log('consumed', context.message);
});
client.connect();
```