# messagingjs

> Communicate between node.js apps

Latest version **1.0.0** (published 2014-09-24) · ISC license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2014-09-24 |
| First published | 2014-09-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matteo Ronchetti |
| Maintainers | rosh |
| Keywords | socket, communication, messaging, tcp |

## Links

- npm: https://www.npmjs.com/package/messagingjs
- Repository: https://github.com/roshbotics/messaging
- Issues: https://github.com/roshbotics/messaging/issues
- npm.io page: https://npm.io/package/messagingjs

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-09-24
- 0.0.0 — 2014-09-23

## README

messaging
=========
Server:
```javascript
var fs = require("fs");
var messaging = require("messagingjs");

var port = 8888;

messaging.Server(port,function(client){
	client.onMessage("hello",function(obj){
		console.log("Client name is: "+obj.name);
		client.sendMessage("hello",{name: "Server"});
	});

	client.onBinary("file",function(buff){
		fs.writeFile("filename",buff);
	});
});

```
Client:
```javascript
var fs = require("fs");
var messaging = require("messagingjs");

var serverIP = "127.0.0.1"
var port = 8888;

var client = new messaging.Client(serverIP,port);
client.onMessage("hello",function(obj){
	if(obj.name == "Server"){
		fs.readFile("filename",function(err,buff){
			client.sendBinary("file",buff);
		});
	}
});
client.sendMessage("hello",{name: "Giancarlo"});

```

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