I followed the tutorial from this link https://github.com/peers/peerjs-server and my code is below:
CLIENT:
<script type="text/javascript" src="../peer.js"></script>
<script>
var peer = new Peer({key: 'lwjd5qra8257b9', debug: 3}, {host: 'my.server.ip', port: 9000, path: '/myapp'});
//some code
</script>
SERVER:
var port = 9000;
var PeerServer = require('peer').PeerServer;
var server = new PeerServer({port: port, path: '/myapp'});
console.log('Peer server running on port: ', port);
The server is running, but if I stop the server, the application still works.
- Does that mean the code is using the Peerjs server as a fallback?
- or the way I connect to the server is wrong?
- How would I know the server I'm connected with?
Thanks,