import ApiManager from "./apis"; import config from "./conf/configuration"; import Databases from "./databases"; import InputManager from "./inputs"; import OutputManager from "./outputs"; export default class Ding { protected config: any; protected apis: ApiManager; protected databases: Databases; protected inputs: InputManager; protected outputs: OutputManager; constructor() { this.config = config; this.apis = new ApiManager(config); this.databases = new Databases(config); const context = this.create_context(); this.outputs = new OutputManager(config); this.inputs = new InputManager(config, context); console.log("Ding.js up and running."); } create_context() { return { influxdb: this.databases.get_influxdb() // mongodb: this.databases.get_mongodb() // rest: this.apis.get_rest() // mqtt: this.apis.get_mqtt() // graphql: this.apis.get_graphql() } } }