Skip to content

functzia/fofx-ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
  }
}

About

A websocket plugin for the fofx platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published