The Question:
How to run a live in-browser dev server?
Context
Stackblitz and CodeSandbox are two platforms that provide online IDE to develop web applications. I have a similar use case, and would need to run an in browser dev server, but there's not much that I was able to find, apart from these few observations.
Few Observations
Stackblitz, in their announcement post describe that they use, "Progressive Web App API’s to run a live dev server in-browser."
To resolve node dependencies stackblitz uses their custom npm client turbo . On the github repo page, it is described as
Express.js routes used for hydrating client-side dependencies and type definitions on StackBlitz.
- There is also some module bundler involved to support live development with hot-reloading.
I suspect stackblitz runs an express.js server in the service worker, but i can't seem to understand how. I'm out of ideas here, any help would be appreciated.