hi developpers hi n0isy
you can use for example chrome extension to allow cross origin just for testing…
i did it with meteor 1.7 but i think binaryjs does not work with meteor …it’s a long time there with no update.
i installed express with meteor and configured all stuff with no error but binaryjs events does not fire
if anyone success to get things work…pealse share with us
// server
import { Meteor } from 'meteor/meteor';
import binaryjs from 'binaryjs';
const { httpServer } = WebApp;
Meteor.startup(() => {
let binaryserver = new binaryjs.BinaryServer({server: httpServer, path: '/binary'});
binaryserver.on('connection', function(client){
console.log('binaryjs server is connected');
/*var file = fs.createReadStream(__dirname + '/flower.png');
client.send(file);*/
});
});
// client
import { Meteor } from 'meteor/meteor';
import binaryjs from 'binaryjs';
Meteor.startup(() => {
let host = location.origin.replace(/^http(s)?/, 'ws') + '/binary';
let client = new binaryjs.BinaryClient(host);
});
tested with meteor 1.7… if you connect binaryjs without path it works with error because you override meteor connexion but if you use path it does not connect