An over-the-wire unidirectional data-flow architecture utilizing Reflux as the flux pattern implementation and SockJS as the websocket implementation. Use conjunction with condux-client.
npm install condux --save
Builds and returns a Condux Server. A Condux Server listens to client actions via its private CLIENT_ACTIONS
channel. Client actions are registered using <ConduxServer>.createAction
or <ConduxServer>.createActions
.
Actions must be symmetrically mirrored on the client using <ConduxClient>
's methods
<ConduxClient>.createAction
and <ConduxClient>.createActions
Kind: global function
convenience method for <SockJS>.installHandlers(server,options)
Kind: instance method of Condux
Param | Type | Description |
---|---|---|
server | object |
http server (express, etc) |
options | object |
passes options as .installHandlers' second argument |
wrapper for Reflux.createAction()
that ensures actions are registered with the
Nexus instance. The ConduxServer
instance acts as a dispatch for all client actions
registered with it.
Kind: instance method of Condux
Param | Type | Description |
---|---|---|
actionName | string |
|
options | object |
Reflux action options object |
wrapper for Reflux.createActions() that ensures each Action is registered on the server nexus
Kind: instance method of Condux
Param | Type |
---|---|
actionNames | array |
wrapper for Reflux.createActions() that ensures each Action is registered on the server nexus
Kind: instance method of Condux
Returns: object
- a Reflux store
Param | Type | Description |
---|---|---|
topic | string |
the name of the channel/frequency the datastore triggers to |
storeDefinition | object |
store methods object, like the one passed to Reflux.createStore |
dummy hook for when a new channel is created
Kind: instance method of Condux
Param | Type | Description |
---|---|---|
topic | string |
the name of the newly created channel |
use Adapter when your app already has a sockjs service
Kind: static property of Condux
Param | Type | Description |
---|---|---|
service | object |
a SockJS server instance created elsewhere with <SockJS>.createServer |