ShareJS 0.7 - Can't open a client connection *from nodejs*
lorivic opened this issue · comments
Opening a client connection from a browser works perfectly.
script "bcsocket.js"
script share.js"
...
var s = new BCSocket(url, { reconnect: true });
var sjs = new window.sharejs.Connection(s);
Opening a client connection from nodejs, basically using the same commands fail:
import ShareJS = require("share");
import BrowserChannel = require("browserchannel");
...
var s = new BrowserChannel.BCSocket(url, { reconnect: true });
var sjs = ShareJS.client.Connection(s); //--> raises an exception Object # has no method 'reset'
I used these modules:
ShareJS 0.7
BrowserChannel 1.1.1
I think you want BrowserChannel = require("browserchannel").server