Nexus Uplink Server (Simple)
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 a simple (but efficient) implementation of the Nexus Uplink server-side protocol. Also see the isomorphic client implementation of the Nexus Uplink client-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