File tree Expand file tree Collapse file tree 4 files changed +8
-2
lines changed
packages/examples/src/quickstart Expand file tree Collapse file tree 4 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ servient.addServer(
2424 port : 8081 ,
2525 } )
2626) ;
27+ core_1 . Helpers . setStaticAddress ( "plugfest.thingweb.io" ) ; // comment this out if you are testing locally
2728let waterAmount = 100 ;
2829let beansAmount = 100 ;
2930let milkAmount = 100 ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ const binding_coap_1 = require("@node-wot/binding-coap");
1919// create Servient add CoAP binding with port configuration
2020const servient = new core_1 . Servient ( ) ;
2121servient . addServer ( new binding_coap_1 . CoapServer ( 5685 ) ) ;
22+ core_1 . Helpers . setStaticAddress ( "plugfest.thingweb.io" ) ; // comment this out if you are testing locally
2223let minuteCounter = 0 ;
2324let hourCounter = 0 ;
2425async function timeCount ( thing ) {
Original file line number Diff line number Diff line change 1616// This is an example Thing script which is a simple coffee machine.
1717// You can order coffee and see the status of the resources
1818
19- import { Servient } from "@node-wot/core" ;
19+ import { Servient , Helpers } from "@node-wot/core" ;
2020import { HttpServer } from "@node-wot/binding-http" ;
2121
2222// create Servient add HTTP binding with port configuration
@@ -27,6 +27,8 @@ servient.addServer(
2727 } )
2828) ;
2929
30+ Helpers . setStaticAddress ( "plugfest.thingweb.io" ) ; // comment this out if you are testing locally
31+
3032let waterAmount = 100 ;
3133let beansAmount = 100 ;
3234let milkAmount = 100 ;
Original file line number Diff line number Diff line change 1515
1616// 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.
1717
18- import { Servient } from "@node-wot/core" ;
18+ import { Servient , Helpers } from "@node-wot/core" ;
1919import { CoapServer } from "@node-wot/binding-coap" ;
2020
2121// create Servient add CoAP binding with port configuration
2222const servient = new Servient ( ) ;
2323servient . addServer ( new CoapServer ( 5685 ) ) ;
2424
25+ Helpers . setStaticAddress ( "plugfest.thingweb.io" ) ; // comment this out if you are testing locally
26+
2527let minuteCounter = 0 ;
2628let hourCounter = 0 ;
2729
You can’t perform that action at this time.
0 commit comments