Nexus Uplink Client (Isomorphic)
Nexus Uplink is an dead-simple, lightweight protocol on top of which Flux over the Wire can be implemented.
- actions are transported via POST requests (url pathname is the action identifier, JSON-encoded body is the payload)
- updates are transported via Websocket (or Engine.IO fallback) (as diff objects)
This package is an isomorphic (which means it can run on either Node.js or in the browser via browserify/webpack) implementation of the Nexus Uplink client-side protocol. Also see the simple server implementation of the Nexus Uplink server-side protocol.
On the server:
var server =pid: _// stores, rooms and actions are url patterns whitelistsstores: '/ping'rooms:actions: '/ping'// pass an express or express-like appapp:;var pingCounter = 0;// setup action handlersserveractions;
On the client:
var client = url: '' ;// subscribe to remote updatesclient;// fire-and-forget dispatch actions;
npm install nexus-uplink-simple-server --save