diff --git a/examples/quickstart/simple-coffee-machine.js b/examples/quickstart/simple-coffee-machine.js index a248afe63..59c39781b 100644 --- a/examples/quickstart/simple-coffee-machine.js +++ b/examples/quickstart/simple-coffee-machine.js @@ -24,6 +24,7 @@ servient.addServer( port: 8081, }) ); +core_1.Helpers.setStaticAddress("plugfest.thingweb.io"); // comment this out if you are testing locally let waterAmount = 100; let beansAmount = 100; let milkAmount = 100; diff --git a/examples/quickstart/smart-clock.js b/examples/quickstart/smart-clock.js index 3478e0029..8c71c0f9c 100644 --- a/examples/quickstart/smart-clock.js +++ b/examples/quickstart/smart-clock.js @@ -19,6 +19,7 @@ const binding_coap_1 = require("@node-wot/binding-coap"); // create Servient add CoAP binding with port configuration const servient = new core_1.Servient(); servient.addServer(new binding_coap_1.CoapServer(5685)); +core_1.Helpers.setStaticAddress("plugfest.thingweb.io"); // comment this out if you are testing locally let minuteCounter = 0; let hourCounter = 0; async function timeCount(thing) { diff --git a/packages/examples/src/quickstart/simple-coffee-machine.ts b/packages/examples/src/quickstart/simple-coffee-machine.ts index 88c1196f8..6c39616f9 100644 --- a/packages/examples/src/quickstart/simple-coffee-machine.ts +++ b/packages/examples/src/quickstart/simple-coffee-machine.ts @@ -16,7 +16,7 @@ // This is an example Thing script which is a simple coffee machine. // You can order coffee and see the status of the resources -import { Servient } from "@node-wot/core"; +import { Servient, Helpers } from "@node-wot/core"; import { HttpServer } from "@node-wot/binding-http"; // create Servient add HTTP binding with port configuration @@ -27,6 +27,8 @@ servient.addServer( }) ); +Helpers.setStaticAddress("plugfest.thingweb.io"); // comment this out if you are testing locally + let waterAmount = 100; let beansAmount = 100; let milkAmount = 100; diff --git a/packages/examples/src/quickstart/smart-clock.ts b/packages/examples/src/quickstart/smart-clock.ts index 4ed040deb..0444ecb50 100644 --- a/packages/examples/src/quickstart/smart-clock.ts +++ b/packages/examples/src/quickstart/smart-clock.ts @@ -15,13 +15,15 @@ // This is an example Thing which is a smart clock that runs 60 times faster than real time, where 1 hour happens in 1 minute. -import { Servient } from "@node-wot/core"; +import { Servient, Helpers } from "@node-wot/core"; import { CoapServer } from "@node-wot/binding-coap"; // create Servient add CoAP binding with port configuration const servient = new Servient(); servient.addServer(new CoapServer(5685)); +Helpers.setStaticAddress("plugfest.thingweb.io"); // comment this out if you are testing locally + let minuteCounter = 0; let hourCounter = 0;