@graphistry/falcor-socket-datasource
v2.11.3
Published
A socket DataSource for Falcor
Downloads
1,503
Readme
Falcor Socket DataSource
A socket DataSource for Falcor.
Installation
npm install falcor-socket-datasource
Usage
- Import Falcor and this library
- Create a new
Falcor.Model
- Set its source to a new
FalcorSocketDataSource
- Use the model as usual
import Falcor from "falcor";
import FalcorSocketDataSource from "falcor-socket-datasource";
const model = new Falcor.Model({
source: new FalcorSocketDataSource("ws://localhost:8080")
});
model.get(...).subscribe(...);
This library uses Socket.IO Client, so using Socket.IO as a server would be a wise choice.
An example of a simple socket server can be found in this test file.