# v-spot-ws

> Web socket impl of v-spot

Latest version **1.1.6** (published 2018-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install v-spot-ws
pnpm add v-spot-ws
yarn add v-spot-ws
bun add v-spot-ws
```

## 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.6 |
| Published | 2018-01-30 |
| First published | 2017-11-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | okunishinishi |
| Maintainers | realglobe, okunishinishi |
| Keywords | the |

## Links

- npm: https://www.npmjs.com/package/v-spot-ws
- Repository: https://github.com/realglobe-Inc/v-spot-ws
- Homepage: https://github.com/realglobe-Inc/v-spot-ws#readme
- Issues: https://github.com/realglobe-Inc/v-spot-ws/issues
- npm.io page: https://npm.io/package/v-spot-ws

## Dependencies (5)

- [ws](https://npm.io/package/ws.md) ^3.3.2
- [uuid](https://npm.io/package/uuid.md) ^3.1.0
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [v-spot](https://npm.io/package/v-spot.md) ^1.2.0
- [shiba-ws-util](https://npm.io/package/shiba-ws-util.md) ^1.0.3

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 1.1.6 (latest) — 2018-01-30
- 1.1.5 — 2017-12-18
- 1.1.4 — 2017-12-11
- 1.1.3 — 2017-12-08
- 1.1.2 — 2017-11-29
- 1.1.1 — 2017-11-29
- 1.1.0 — 2017-11-29
- 1.0.14 — 2017-11-28
- 1.0.13 — 2017-11-28
- 1.0.12 — 2017-11-25
- 1.0.10 — 2017-11-25
- 1.0.9 — 2017-11-24
- 1.0.8 — 2017-11-24
- 1.0.7 — 2017-11-23
- 1.0.6 — 2017-11-22
- … 6 more at https://npm.io/package/v-spot-ws/versions

## README

v-spot-ws
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/realglobe-Inc/v-spot-ws
[bd_travis_url]: http://travis-ci.org/realglobe-Inc/v-spot-ws
[bd_travis_shield_url]: http://img.shields.io/travis/realglobe-Inc/v-spot-ws.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/realglobe-Inc/v-spot-ws
[bd_travis_com_shield_url]: https://api.travis-ci.com/realglobe-Inc/v-spot-ws.svg?token=
[bd_license_url]: https://github.com/realglobe-Inc/v-spot-ws/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/realglobe-Inc/v-spot-ws
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/realglobe-Inc/v-spot-ws.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/realglobe-Inc/v-spot-ws.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/realglobe-Inc/v-spot-ws
[bd_gemnasium_shield_url]: https://gemnasium.com/realglobe-Inc/v-spot-ws.svg
[bd_npm_url]: http://www.npmjs.org/package/v-spot-ws
[bd_npm_shield_url]: http://img.shields.io/npm/v/v-spot-ws.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

Web socket impl of v-spot

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install v-spot-ws --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

```javascript
'use strict'

const vSpotWS = require('v-spot-ws')

async function tryExample () {
  const port = 8080
  const Spot = vSpotWS()

  const NewYork = vSpotWS.clinet()
  const Japan = vSpotWS.clinet()

  await Spot.listen(port)

  await NewYork.connect(`http://localhost:${port}`)
  await Japan.connect(`http://localhost:${port}`)

  {
    class Person {
      async hi (msg) {
        return `hi, ${msg}`
      }
    }

    // Create a instance to a spot
    const john = NewYork.load(Person, 'jp.realglobe.new-york.john')
    await john.hi('I am in NewYork!')
  }

  {
    // Use remote instance
    const john = await Japan.use('jp.realglobe.new-york.john')
    await john.hi('Calling from Japan!')
  }
}

tryExample().catch((err) => console.error(err))

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->

<!-- Section from "doc/guides/10.API Guide.md.hbs" Start -->

<a name="section-doc-guides-10-a-p-i-guide-md"></a>

API Guide
-----

+ [v-spot-ws@1.1.6](./doc/api/api.md)
  + [create(args)](./doc/api/api.md#v-spot-ws-function-create)
  + [VSpotWS](./doc/api/api.md#v-spot-w-s-class)


<!-- Section from "doc/guides/10.API Guide.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/realglobe-Inc/v-spot-ws/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [v][v_url]
+ [Realglobe, Inc.][realglobe,_inc__url]

[v_url]: https://github.com/realglobe-Inc/v
[realglobe,_inc__url]: http://realglobe.jp

<!-- Links End -->

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