Skip to content

Commit 2976374

Browse files
refactor: properly start server
add launch configuration for counter (server) as well
1 parent 26d10d9 commit 2976374

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.vscode/launch.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
"args": ["--client-only", "counter-client.js"],
1111
"cwd": "${workspaceRoot}/examples/scripts/"
1212
},
13+
{
14+
"type": "node",
15+
"request": "launch",
16+
"name": "Launch Counter",
17+
"program": "${workspaceRoot}/packages/cli/dist/cli.js",
18+
"args": ["counter.js"],
19+
"cwd": "${workspaceRoot}/examples/scripts/"
20+
},
1321
{
1422
"type": "node",
1523
"request": "attach",

packages/cli/src/cli-default-servient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default class DefaultServient extends Servient {
123123
}
124124

125125
let coapServer: CoapServer | undefined;
126-
if (this.config.servient.clientOnly == null) {
126+
if (this.config.servient.clientOnly === false) {
127127
if (this.config.http != null) {
128128
const httpServer = new HttpServer(this.config.http);
129129
this.addServer(httpServer);

0 commit comments

Comments
 (0)