diff --git a/lc-esp-sdk-js/build.ps1 b/lc-esp-sdk-js/build.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..2e0b11a53aa30efca834bd5fc3a9c9457606c9f4 --- /dev/null +++ b/lc-esp-sdk-js/build.ps1 @@ -0,0 +1 @@ +npx webpack --mode development \ No newline at end of file diff --git a/lc-esp-sdk-js/src/index.js b/lc-esp-sdk-js/src/index.js index de40958b73045f24c8a682c2024ca54f72656d59..0aad1c5372728af8de1e2a88a72bb905a69c0370 100644 --- a/lc-esp-sdk-js/src/index.js +++ b/lc-esp-sdk-js/src/index.js @@ -7,10 +7,6 @@ console.log('Enhanced Services Platform/SDK mk18 (GIPSY DANGER)'); ESP.devtest = function () { const client = new Client({ brokerURL: 'ws://esp1.leigh-co.com:52021/ws', - // connectHeaders: { - // login: 'user', - // passcode: 'password', - // }, debug: function (str) { console.log(str); }, @@ -21,12 +17,10 @@ ESP.devtest = function () { client.onConnect = function (frame) { console.log('stomp connected!'); - const subscription = client.subscribe('LC.TELEMETRY', function () { + client.subscribe('/topic/LC.TELEMETRY', function () { console.log('Got message'); - }); - client.publish({destination: 'LC.TELEMETRY', body: 'Hello world'}); - + client.publish({destination: '/topic/LC.TELEMETRY', body: 'Hello world'}); }; client.onStompError = function (frame) {