I got the PeerServer working BUT

866 views
Skip to first unread message

Scott Jason

unread,
Nov 12, 2014, 6:56:24 PM11/12/14
to pee...@googlegroups.com
The only way was to follow someone who had done it before but it's a year old :


and here's what his peerserver looks like :



What do I need to do in the current PeerServer repo before deploying to heroku to be able to run it this way? Or does anyone have a complete example I can take a look at?


Thanks,

Scott

Michelle Bu

unread,
Nov 12, 2014, 7:21:34 PM11/12/14
to Scott Jason, peerjs
There's actually a deploy to heroku button now for PeerServer :):
https://github.com/peers/peerjs-server#httppeerjscom
Michelle

Scott Jason

unread,
Nov 12, 2014, 7:46:28 PM11/12/14
to pee...@googlegroups.com, scottl...@gmail.com, miche...@berkeley.edu
Hi Michelle,

Ya so I have two deployed : that one and the one from that guys repo.

I couldn't figure out what I needed to do both in the current one and in my project to mimic what he is doing in his peer server and in his project.

I'm using Angular, here's the working, but old, version of how I create a peer object on the client :

1 of 2. CDN - I'm using the CDN from the peerjs site because attaching the dependency as local lib throws an error.

2 of 2. Create a new Peer Object on the client :
;(function () {

    'use strict'

angular.module('peerApp')
  .factory('PeerFactory', function ( eventEmitter ) {

    function PeerFactory() {
    this.peer = new Peer({ host:'peer-server-meet-v2.herokuapp.com', secure:true, port:443, key: 'peerjs', debug: 3})
    }
    return PeerFactory;
});
})();

And aside from that I literally just cloned his repo exactly. THe only thing I changed what the host of course.

So that works, but I can't get this same thing to work with the current peer server.

PS . Hi from SF! I used to live on University like a hundred years ago!

Thanks,

Scott
Reply all
Reply to author
Forward
0 new messages