This commit is contained in:
Wolfgang Hottgenroth
2017-07-22 23:39:14 +02:00
commit dad740e620
9 changed files with 335 additions and 0 deletions

27
src/main.ts Normal file
View File

@ -0,0 +1,27 @@
import * as log from './log'
import * as MqttClient from './mqttclient'
class Dispatcher {
private _mqttClient: MqttClient.MqttClient
constructor() {
this._mqttClient = new MqttClient.MqttClient()
this._mqttClient.register('IoT/test', null)
this._mqttClient.register('IoT/Device/#', null)
}
exec() : void {
log.info("Dispatcher starting")
this._mqttClient.exec()
}
}
const dispatcher = new Dispatcher()
dispatcher.exec()