initial
This commit is contained in:
27
src/main.ts
Normal file
27
src/main.ts
Normal 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()
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user