fofx-ws

1.1.0 • Public • Published

fofx-ws

An input/output plugin for WebSockets for fofx

  • type: "ws"
  • params (these go in your plugins.json):
    • port [int] this is the port your server listens on (default: 8080)
  • input params (these go in your nano.json input key):
    • endpoint [string] this will trigger on a request to http://localhost:\<port>/ws/<endpoint>
    • broadcast [bool] should the return value be broadcasted to all clients connected to the endpoint
  • output params (these go in your nano.json output key):
    • url [string] create a WebSocket client bound to this url, and send the nano's output to its server

Sample plugins.json

[
  {
    "name": "fofx-ws",
    "params": {
      "port": 6000
    }
  }
]

Sample nano.json

{
  "input": {
    "type": "ws",
    "endpoint": "foo"
  },
  "output": {
    "type": "ws",
    "url": "ws://localhost:6000/ws/bar"
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i fofx-ws

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

7.45 kB

Total Files

7

Last publish

Collaborators

  • oakfang