typescriptifying
This commit is contained in:
24
src/main.ts
24
src/main.ts
@ -1,14 +1,28 @@
|
||||
class Test {
|
||||
import * as logger from './log'
|
||||
import * as config from './config'
|
||||
|
||||
// import { mqttHandler } from './MqttDispatcher'
|
||||
|
||||
|
||||
config.readConfig()
|
||||
|
||||
|
||||
class Dispatcher {
|
||||
constructor() {
|
||||
console.log("Test constructed")
|
||||
logger.info("Dispatcher starting")
|
||||
}
|
||||
|
||||
exec() : void {
|
||||
console.log("Hello world")
|
||||
logger.info("Hello world")
|
||||
|
||||
|
||||
|
||||
|
||||
// mqttHandler.exec()
|
||||
}
|
||||
}
|
||||
|
||||
const test = new Test()
|
||||
test.exec()
|
||||
const dispatcher = new Dispatcher()
|
||||
dispatcher.exec()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user