New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hume/app-ws

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hume/app-ws

Websockets service application abstraction to decrease the load in the HTTP APIs for common read only requests.

  • 0.7.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

hume WS app

Websockets service application abstraction to decrease the load in the HTTP APIs for common read only requests.

For now it keeps an updated cache in memory of the needed data. All the connected clients will receive an update of the requested one in an interval.

Install

:coffee: Install Node.js v8 and then:

npm i @hume/app-ws

Dependencies

  • Install the dependencies for the websockets library from your OS package manager.

Use

:pencil: Please visit the the example.

Client side

Two query parameters are supported:

  • token (string) - Mandatory, see the last point of this document.
  • filter (string) - To serve only the the contend under one key of the cache. (default: null)

Please visit the example.

API

:eyes: Full specification.

app.start(cache, token, apm) -> null

Start the LoopBack app.

  • cache (async function) - Method to get the data to serve.
  • token (string) - For now we only need basic auth to avoid automated scrappers. If not passed auth is disabled. (default: null)
  • apm (object) - Elastic APM express.js agent instance (already started).

async app.stop() -> null

Stop the websocket service, useful in tests.

Keywords

FAQs

Package last updated on 17 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc