added websockets login
This commit is contained in:
@@ -74,7 +74,7 @@ function Node()
|
||||
web3.setProvider(new web3.providers.HttpSyncProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8080')));
|
||||
|
||||
socket.on('open', function open() {
|
||||
socket.emit('hello', { id: self.id, info: self.info});
|
||||
socket.emit('hello', { id: self.id, info: self.info, secret: process.env.WS_SECRET });
|
||||
console.log('The connection has been opened.');
|
||||
}).on('end', function end() {
|
||||
self._socket = false;
|
||||
@@ -92,7 +92,7 @@ function Node()
|
||||
self.sendUpdate(true);
|
||||
|
||||
console.log('The connection has been established.');
|
||||
})
|
||||
});
|
||||
|
||||
this.init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user