switched to self hosted peerjs server

This commit is contained in:
Kevin Jahns
2014-10-06 16:53:09 +02:00
parent 3c21fd08b7
commit 590c5ea900
4 changed files with 75 additions and 14 deletions

View File

@@ -24,7 +24,25 @@ The first parameter of `createPeerJsConnector` is forwarded as the options objec
Therefore, you may also specify the server/port here, if you have set up your own server.
*/
var yatta, yattaHandler;
Y.createPeerJsConnector({key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){
/**
This will connect to the server owned by the peerjs team.
For now, you can use my API key.
*/
// var conn = {key: 'h7nlefbgavh1tt9'};
/**
This will connect to one of my peerjs instances.
I can't guaranty that this will be always up. This is why you should use the previous method with the api key,
or set up your own server.
*/
var conn = {
host: "terrific-peerjs.herokuapp.com",
port: "", // this works because heroku can forward to the right port.
// debug: true,
};
Y.createPeerJsConnector(conn, function(Connector, user_id){
/**
You can also specify your own user_id with peerjs.