Can't send fetched data to my socket.io stream?
问题 I'm trying to switch from single mysql-queries to mysql-pool connection, so users can share one mysql-connection, but I'm not familiar with this at all (also new to nodejs/socket.io). The following code is what I've done so far to send data every second to the socket in an array: var port = process.env.OPENSHIFT_NODEJS_PORT || 8000, ip = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1', app = require('http').createServer(handler), fs = require('fs'), request = require('request'), mysql =