const WebSocket = require('ws');
const ReconnectingWebSocket = require("reconnecting-websocket");

var wpp_server = 'ws://191.252.196.137:5000/'
const ws_server = new ReconnectingWebSocket(WS_SERVER, [], {
  WebSocket: WebSocket
});


console.log('init');
ws_server.addEventListener("open", (event) => {
  console.log('conectou');
});

ws_server.addEventListener("error", (event) => {
  console.log("WebSocket error: ", event);
});

ws_server.addEventListener("close", (event) => {
  console.log("The connection has been closed successfully.");
});