Skip to content

Instantly share code, notes, and snippets.

@5HT
Last active August 29, 2015 14:16
Show Gist options
  • Save 5HT/2038e449c908b3a127fc to your computer and use it in GitHub Desktop.
Save 5HT/2038e449c908b3a127fc to your computer and use it in GitHub Desktop.
// to install: $ npm install ws
// to run: $ node health.js
var WebSocket = require('ws');
var ws = new WebSocket('wss://deposits.privatbank.ua/ws/static/app/open.htm');
ws.on('open', function open() { console.log('ok'); ws.send('N2O,'); });
ws.on('close', function close() { console.log('closed'); });
ws.on('message', function message(data, flags) {
console.log('Data');
console.log(data);
ws.close();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment