Skip to content

Commit

Permalink
fix(cli): adjust config usage for default servient
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Sep 13, 2023
1 parent 3e84166 commit 0cbecdc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/cli/src/cli-default-servient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class DefaultServient extends Servient {
},
http: {
port: 8080,
selfSigned: false,
allowSelfSigned: false,
},
coap: {
port: 5683,
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0cbecdc

Please sign in to comment.