diff --git a/examples/http-external-ws.js b/examples/http-external-ws.js index c95e95d1..2e39d70e 100644 --- a/examples/http-external-ws.js +++ b/examples/http-external-ws.js @@ -35,7 +35,7 @@ wss.on('connection',acceptConnection ) var gunPeers = []; // used as a list of connected clients. -gun.on('out', function(msg){ +Gun.on('out', function(msg){ msg = JSON.stringify({headers:{},body:msg}); gunPeers.forEach( function(peer){ peer.send( msg ) }) })