My nodejs / express server.js file:
const express = require('express');
const app = express();
const http = require('http').Server(app);
const io = require('socket.io')(http);
const path = require('path');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const zmq = require('zeromq');
const sock = zmq.socket('pull');
const port = 3000;
sock.connect('tcp://127.0.0.1:3000');
console.log('Worker connected to port 3000');
sock.on('message', function(msg){
console.log('work: %s', msg.toString());
});
http.listen(port, () => {
console.log(`listening on ${port}`);
});
What do I need to do in order to send forex rates to tcp://127.0.0.1:3000
from MetaTrader Terminal, which is running locally in parallel with the nodejs application?
Basically I want to emit them using a socket.io to the clients.