This repository has been archived on 2025-10-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2021-06-06 20:25:14 +02:00

27 lines
555 B
JavaScript

var log = require('../core/log');
var moment = require('moment');
var _ = require('lodash');
var Server = require('../web/server.js');
var Actor = function(next) {
_.bindAll(this);
this.server = new Server();
this.server.setup(next);
}
Actor.prototype.init = function(data) {
this.server.broadcastHistory(data);
};
Actor.prototype.processCandle = function(candle, next) {
this.server.broadcastCandle(candle);
next();
};
Actor.prototype.processAdvice = function(advice) {
this.server.broadcastAdvice(advice);
};
module.exports = Actor;