Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.config.servient.clientOnly = true;
}
// load credentials from config
this.addCredentials(this.config.credentials);
// remove secrets from original for displaying config (already added)
if(this.config.credentials) delete this.config.credentials;
// display
console.info("DefaultServient configured with");
console.dir(this.config);
// apply config
if (typeof this.config.servient.staticAddress === "string") {
Helpers.setStaticAddress(this.config.servient.staticAddress);
}
if (!this.config.servient.clientOnly) {
if (this.config.http !== undefined) {
let httpServer = new HttpServer(this.config.http);
this.addServer(httpServer);
// re-use httpServer (same port)
this.addServer(new WebSocketServer(httpServer));
}
if (this.config.coap !== undefined) {
// var to reuse below in CoapClient
var coapServer = (typeof this.config.coap.port === "number") ? new CoapServer(this.config.coap.port) : new CoapServer();
this.addServer(coapServer);
}
if (this.config.mqtt !== undefined) {