I want to build a web app, for fun.
I have built various air quality sensors running on ESP8266micro-controllers, communicating via a message broker to an agent which persists the readings to a MariaDbdatabase.
I have built a R-Shiny app to analyze/present readings to anyone with a browser.
I am bored of using R Shiny, it is kinda limiting and the free version doesn’t support HTTPS etc.
So I want to build a proper web app instead.
So far, I have built a back end web server which provides a REST type API so that anything that can speak HTTP can request data. This is working perfectly and I have even ported my shiny app to use the web api rather than directly connecting to the MySql DB.
My favorite language is F# so I have built the web api using Suave and I want to build the front end in Elmish.
However I don’t really know much about web apps and I can’t figure out how to deploy anything!
Here comes my question…
My (perhaps flawed) understanding is that all I need for any web app front end is HTML, CSS and Javascript. (Elmish generates Javascript). So I could, in principle, just double click on an html file (with appropirate linkage to CSS and JS files) and everything would work just fine. Is that correct? How do I do it from the back end server? Do I just respond to some request with an html file? what about the css and js files?
I’m asking this question here because dopers are willing to explain things. If I asked this on stack overflow, they would have a fit!