0

Need Some Guidance On Using Node.js Properly

I'm working with a few different models on a project in xt4 and xt5 series.

The project displays buttons on a touchscreen monitor that trigger different videos to play on the same screen. The way I've been doing it is using express to build a web server that serves a default index.html page I made and also websockets to allow messaging between the server and frontend.

Using BA: Connected I add the server.js file to the project under node.js support files, then I add an HTML widget and set it to load localhost and my server's listening port.

It works fairly well, however I recently discovered the BrightSign cookbook stuff on github and looking through it, it seems to take a different approach.

What I'm hoping to get feedback on is if the approach I'm using now is the best in terms of speed and stability. I don't really understand why the example project has a .js file that loads the web server instead of just loading the web server directly. I'm also confused about modifying the autorun file, isn't BA connected doing that work for me already?

tldr: I have my node.js web server file as a support file in ba connected and use and html widget to load the homepage on screen. Is this the best approach?

0 comments

Please sign in to leave a comment.