# webmc

> Display Minecraft log in browsers

Latest version **1.1.0** (published 2019-10-19) · MIT license · 0 weekly downloads

## Install

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

Provides the command `webmc`.

## 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.1.0 |
| Published | 2019-10-19 |
| First published | 2019-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 269.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hadroncfy |
| Maintainers | hadroncfy |

## Links

- npm: https://www.npmjs.com/package/webmc
- npm.io page: https://npm.io/package/webmc

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^7.1.2
- [mime](https://npm.io/package/mime.md) ^2.4.4

## Recent versions

- 1.1.0 (latest) — 2019-10-19
- 1.0.0 — 2019-10-13

## README

# webmc

[![npm version](https://img.shields.io/npm/v/pnpm.svg)](https://www.npmjs.com/package/webmc)

Display the output of a process in browsers.

![Demo](demo.png)

## Original purpose
This programme was originally used by me to display Minecraft log text when queueing in [2b2t](//2b2t.org), so I could see my position in queue when away from computer, such as when going out for dinner.

## Usage
The CLI program is piping the output of a local port to a websocket so that can be viewed in browsers. The local port could be created by [jmcl](https://github.com/Hadron67/jmcl), which is what I usually do. 

### API
```js

const createServer = require('webmc');

const server = createServer({
    addr: 'localhost:8080', // server address, used in websocket handshake, port number must be consistent with `port'
    port: 8080, // server port
    decodeMC: true // whether to decode Minecraft color code
});

const childProcess = /* Create a child process, could be Minecraft */;

prc.stdout.on('data', data => server.write(data));

```

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