From 0cbecdc81013e99f805a25870ebb36c0efc45602 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Wed, 13 Sep 2023 18:26:02 +0200 Subject: [PATCH] fix(cli): adjust config usage for default servient --- packages/cli/src/cli-default-servient.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/cli-default-servient.ts b/packages/cli/src/cli-default-servient.ts index b7f8711ca..4005ffbe1 100644 --- a/packages/cli/src/cli-default-servient.ts +++ b/packages/cli/src/cli-default-servient.ts @@ -70,7 +70,7 @@ export default class DefaultServient extends Servient { }, http: { port: 8080, - selfSigned: false, + allowSelfSigned: false, }, coap: { port: 5683, @@ -131,11 +131,9 @@ export default class DefaultServient extends Servient { // re-use httpServer (same port) // this.addServer(new WebSocketServer(httpServer)); } - if (this.config.coap) { - coapServer = - typeof this.config.coap.port === "number" - ? new CoapServer(this.config.coap.port) - : new CoapServer(); + const coapConfig = this.config.coap; + if (coapConfig != null) { + coapServer = new CoapServer(coapConfig); this.addServer(coapServer); } if (this.config.mqtt) {