From cda017c04b96c0ae01b5c510fe458ea6b4960cb1 Mon Sep 17 00:00:00 2001 From: "C. Alexander Leigh" Date: Wed, 18 May 2022 20:11:15 -0700 Subject: [PATCH] lc-esp-sdk-js: Added build script for Windows --- lc-esp-sdk-js/build.ps1 | 1 + lc-esp-sdk-js/src/index.js | 10 ++-------- 2 files changed, 3 insertions(+), 8 deletions(-) create mode 100644 lc-esp-sdk-js/build.ps1 diff --git a/lc-esp-sdk-js/build.ps1 b/lc-esp-sdk-js/build.ps1 new file mode 100644 index 000000000..2e0b11a53 --- /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 de40958b7..0aad1c537 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) { -- GitLab