# procomm

> Simple file-to-file IPC framework

Latest version **0.1223.2** (published 2022-12-24) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1223.2 |
| Published | 2022-12-24 |
| First published | 2022-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | e0selmy4v |
| Maintainers | e0selmy4v |
| Keywords | ipc, events, event emitter, light |

## Links

- npm: https://www.npmjs.com/package/procomm
- Repository: https://github.com/E0SelmY4V/procomm
- Homepage: https://github.com/E0SelmY4V/procomm#readme
- Issues: https://github.com/E0SelmY4V/procomm/issues
- npm.io page: https://npm.io/package/procomm

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md)

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1223.2 (latest) — 2022-12-24
- 0.1223.0 — 2022-12-23

## README

# Scpos Inter-Process Communication Library

*procomm* can make file-to-file IPC come ture.
Through elegant method chain, you can let the JS file running in different processes communicate alone with each other by "listen" and "tell".

## Initialization

To initialize *procomm*, you need:

```javascript
const procomm = require('procomm')(__filename);
// or
import procommIniter from 'procomm';
const procomm = procommIniter(__filename);
```

## Usage

Send message to JS file `./dad.js` running in father process:

```javascript
procomm.tell('dad', 'hello');
```

Send message to `./folder/son.js` in child process:

```javascript
const subProce = child_process.fork(path.join(__dirname, 'folder/son'));
procomm.reProce(subProce).tell('folder/son', 'hello');
```

Listen message from `../dad.js` in father process:

```javascript
procomm.listen('../dad', msg => console.log(msg));
```

Listen message from `/home/test/son.js` in child process:

```javascript
const subProce = child_process.fork('/home/test/son');
procomm.reProce(subProce).listen('/home/test/son.js', msg => console.log(msg));
```

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