dimanche 26 janvier 2020

Create a "serverless" web app that displays results from a SQL Query and "refreshes" every X seconds?

As I said in the description, I need to execute a SQL Query and display the results from that query. The query should execute every 5-20 seconds (probably every 5) and the display should be refreshed with the new values. This is for a large LCD TV in the factory. (Think of it as a "digital sign".)

Obviously, there are MANY ways to accomplish this. Although, I want to remove as many dependencies (on external servers/resources) as possible. Therefore, I am trying to do this WITHOUT a Web Server. I would like to simply have a "file" (or several files) that can just be loaded on the computer and then opened in a Web Browser. The reason I am leaning toward running this in a browser is in case the computer that is attached to this display is ever replaced with something running a different O/S. Currently it's running Windows 10, but there could be some compelling reasons to switch to Linux (via a raspberry pi, for instance). I have considered (and am open to) JavaScript frameworks such as Angular/React/Vue and WebAssembly. The simpler and less number of files to deploy, the better.

Being a ".NET" developer, I could just create a simple Windows Application, but that wouldn't cover my "portability requirement" (Linux as an alternate O/S). It would be quick and easy, though... I just can't get the idea out of my head that there has to be an "easy" way to do this in HTML/JavaScript, that I am simply not considering. So, any thoughts, recommendations, etc are greatly appreciated!




Aucun commentaire:

Enregistrer un commentaire