# mongosockets

> mongosockets ===

Latest version **1.0.1** (published 2016-12-31) · ISC license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2016-12-31 |
| First published | 2016-12-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | francoisv |

## Links

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

## Dependencies (6)

- [ws](https://npm.io/package/ws.md) ^1.1.1
- [uuid](https://npm.io/package/uuid.md) ^3.0.1
- [maeva](https://npm.io/package/maeva.md) ^2.6.5
- [colors](https://npm.io/package/colors.md) ^1.1.2
- [moment](https://npm.io/package/moment.md) ^2.17.1
- [maeva-mongodb](https://npm.io/package/maeva-mongodb.md) ^2.0.0

## Recent versions

- 1.0.1 (latest) — 2016-12-31

## README

mongosockets
===

# Install

```bash
npm install mongosockets
```

# Usage (server)

```bash
npm start 3000
```

# Start new worker on port 9000

```bash
npm run worker 9000 mongodb://localhost/test
```

# Usage (client)

```javascript
import {connect} from 'mongosockets';
import maeva, {Model} from 'maeva';

// Define a model
class User extends Model {
  static schema = {email: String};
}

// Connect to a mongosockets server
await maeva.connect(connect('ws://localhost:9000'));

// Perform queries
await User.insert({email: 'john@doe.com'});
```

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