front-of-house / presta

Minimalist serverless framework for SSR, SSG, serverless APIs and more.
https://presta.run
MIT License
95 stars 6 forks source link

Use `EventSource` instead of websockets #194

Open estrattonbailey opened 2 years ago

estrattonbailey commented 2 years ago

https://developer.mozilla.org/en-US/docs/Web/API/EventSource

barelyhuman commented 4 months ago

Based on existing experience, this ends up adding a little more lag in the live reload as compared to the web socket, while the websocket is a little more un-reliable without a few patches.

A simple fix might be the retry mechanism available from the following post https://adamcoster.com/blog/create-a-live-reload-server-for-front-end-development