This is a simple demo Todos app that uses Differential Sync and JSON Patch over WebSocket to synchronize data between the server and any number of connected clients, in near-real-time.
npm install
bower install
npm start
- Open http://localhost:8080 in a browser window
- Add/remove/edit/etc some todos
- Open http://localhost:8080 in a second browser window
- Add/remove/edit/etc some todos
- Open http://localhost:8080 in a third browser window
- Add/remove/edit/etc some todos
- ...
- Be sure to try the shiny, candy-like button. It does a bunch of things in one "transaction", ie in a single websocket message:
- Doubles the number of todos
- Completes every 3rd todo
- Appends "!!!!" to every 5th todo
- Removes every other todo
You can use Chrome's network tab to watch the websocket frames, and the server will log patching events to the console.