13 lines
580 B
TypeScript
13 lines
580 B
TypeScript
import { MultiMessageBroker, FileImporter } from "aas-multimessagebroker";
|
|
|
|
import HTTPInterfaceServer from "./modules/httpInterfaceServer";
|
|
import MQTTConnector from "./modules/mqttConnector";
|
|
|
|
const aas = FileImporter.readAASByPath("../owntest.json");
|
|
|
|
const broker = new MultiMessageBroker();
|
|
broker.registerInterfaceConnection({ interfaceConnection: MQTTConnector, config: { reconnectPeriod: 1000 }})
|
|
broker.registerAAS({ aas, serverInterfaces: { serverInterface: HTTPInterfaceServer, config: { bindPort: 3000, bindAddress: "0.0.0.0" } } });
|
|
|
|
broker.prepare();
|
|
broker.start(); |