I started learning about Ionic-Stencil and PWA in general around a month and a half ago.
I read ‘Creating Ionic Applications with StencilJS’ by Josh Morony. He’s got a lot of great resources on his website and I learned quite a lot through those and his book.
However, the book doesn’t cover the idea of self-hosting a PWA. Everywhere I read about this, people suggest to use either Netlify (as in the book) or Firebase, but I want it to be hosted on my server.
I suppose that a Node server would be able to serve the PWA, but I don’t know where to start with that.
My only previous notions of hosting websites with Node was to use Sailsjs, which makes the process trivial.
However, I would prefer to start from scratch, so ideally, not use Express or Sails to serve the website.
I am not asking for code that would allow me to do that, only for indications of resources that I should study in order to better understand the process and achieve my goal.
I checked all around for the last three days, and while there are different resources talking about that, most of the time they advise using Netlify or Firebase, and most of the time, the information is outdated.
A lot of lessons talks about how to make a Node server, but I don’t understand how to use that knowledge in order to host a Ionic-Stencil PWA.
Note that I am not interested in publishing the website on the internet, the only part I am interested in is to allow users from my network to access the page with their browser, and to install the PWA if desired.
So I don’t ask about DNS, redirection, etc. Only the step prior to that.
If you have any questions, please write me back.
Thanks in advance.
Edit: Obviously, just after writing that, I found some simple explanations. I will test test them and come back here to indicate if it worked.
For people interested by that question, see that page: https://stackoverflow.com/questions/51470188/deploying-and-hosting-a-pwa-in-nodejs
Simply put, you need to put the www folder in the node file structure and respond with index.html. I supposed that it was something like that.