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;