From b964053505c26f613adf72d211101ea3b3a3ee9d Mon Sep 17 00:00:00 2001 From: Aleksas Kliska Date: Wed, 22 May 2024 10:49:19 +0100 Subject: [PATCH] fix in autorun, html instantiated before nodejs --- cra-template-brightsign-app/template/src/autorun.brs | 8 ++++---- .../template/src/autorun.brs | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cra-template-brightsign-app/template/src/autorun.brs b/cra-template-brightsign-app/template/src/autorun.brs index a6237fa..9a1db17 100644 --- a/cra-template-brightsign-app/template/src/autorun.brs +++ b/cra-template-brightsign-app/template/src/autorun.brs @@ -8,12 +8,12 @@ function main() ' Enable SSH enableSSH() + ' Initialize roNodeJs with path or correct filename, whether webpack is used or not. + node_js = CreateObject("roNodeJs", "sd:/dist/backend.js", {message_port: mp, node_arguments: ["--inspect=0.0.0.0:2999"], arguments: []}) + ' Create HTML Widget widget = createHTMLWidget(mp) widget.Show() - - ' Initialize roNodeJs with path or correct filename, whether webpack is used or not. - node_js = CreateObject("roNodeJs", "sd:/dist/backend.js", {message_port: mp, node_arguments: ["--inspect=0.0.0.0:2999"], arguments: []}) 'Event Loop test while true @@ -85,4 +85,4 @@ function enableSSH() regSSH.Flush() -end function \ No newline at end of file +end function diff --git a/cra-template-brightsign-dashboard/template/src/autorun.brs b/cra-template-brightsign-dashboard/template/src/autorun.brs index 557554f..e38f67a 100644 --- a/cra-template-brightsign-dashboard/template/src/autorun.brs +++ b/cra-template-brightsign-dashboard/template/src/autorun.brs @@ -6,13 +6,14 @@ function main() enableLDWS() ' Enable SSH enableSSH() - ' Create HTML Widget - widget = createHTMLWidget(mp) - widget.Show() ' Initialize roNodeJs with path or correct filename, whether webpack is used or not. node_js = CreateObject("roNodeJs", "sd:/dist/backend.js", {message_port: mp, node_arguments: ["--inspect=0.0.0.0:2999"], arguments: []}) + ' Create HTML Widget + widget = createHTMLWidget(mp) + widget.Show() + 'Event Loop while true msg = wait(0,mp) @@ -84,4 +85,4 @@ function enableSSH() regSSH.Flush() -end function \ No newline at end of file +end function