2014-01-13 13:13:41 -08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var Transaction = require('../../models/Transaction');
|
|
|
|
|
|
|
|
module.exports = function(app, io) {
|
|
|
|
io.set('log level', 1); // reduce logging
|
|
|
|
io.sockets.on('connection', function(socket) {
|
2014-01-13 14:07:12 -08:00
|
|
|
Transaction.findOne(function(err, tx) {
|
|
|
|
socket.emit('tx', tx);
|
2014-01-13 13:13:41 -08:00
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|