# mono-io

> IO module for Mono

Latest version **1.1.4** (published 2017-10-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install mono-io
pnpm add mono-io
yarn add mono-io
bun add mono-io
```

## 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.4 |
| Published | 2017-10-21 |
| First published | 2017-10-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | gaetansenn, benjamincanac, atinux |
| Keywords | socket.io, mono, mono-io, io |

## Links

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

## Dependencies (1)

- [socket.io](https://npm.io/package/socket.io.md) ^2.0.3

## 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.1.4 (latest) — 2017-10-21
- 1.1.3 — 2017-10-21
- 1.1.2 — 2017-10-18

## README

<h1 align="center"><img src="https://user-images.githubusercontent.com/904724/31045653-d73c6302-a5e8-11e7-8db6-058077d4a848.png" width="350" alt="Mono"/></h1>

> Socket.io module for [Mono](https://github.com/terrajs/mono)

[![npm version](https://img.shields.io/npm/v/mono-io.svg)](https://www.npmjs.com/package/mono-io)
[![Travis](https://img.shields.io/travis/terrajs/mono-io/master.svg)](https://travis-ci.org/terrajs/mono-io)
[![Coverage](https://img.shields.io/codecov/c/github/terrajs/mono-io/master.svg)](https://codecov.io/gh/terrajs/mono-io.js)
[![license](https://img.shields.io/github/license/terrajs/mono-io.svg)](https://github.com/terrajs/mono-io/blob/master/LICENSE)

Mono-io uses [socket.io](https://github.com/socketio/socket.io) and [socketio-jwt](https://github.com/auth0-community/socketio-jwt) to handle sockets with authorization via JWT.

## Installation

```bash
npm install --save mono-io
```

Then, in your configuration file of your Mono application (example: `conf/application.js`):

```js
module.exports = {
  mono: {
    modules: ['mono-io']
  }
}
```

## Configuration

mono-io will use the `io` property of your configuration (example: `conf/development.js`):

```js
module.exports = {
  mono: {
    io: {
      // See options here: https://github.com/socketio/socket.io/blob/master/docs/API.md#new-serverhttpserver-options
    }
  }
}
```

## Usage

In your modules files, you can access `io` instance:

```js
const { io } = require('mono-io')

io.on('connection', function (socket) {
  console.log(socket)
})
```

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