πŸ’­ florimondmanca/arel: Lightweight browser hot reload for Python... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ !https://github.com/florimondmanca/arel Date: October 8, 2023 Image: GitHub - florimondmanca/arel: Lightweight browser hot reload for Python ASGI web apps β€” Lightweight browser hot reload for Python ASGI web apps - florimondmanca/arel GitHub - florimondmanca/arel: Lightweight browser hot reload for Python ASGI web apps Lightweight browser hot reload for Python ASGI web apps - florimondmanca/arel GitHub Β· github.com arel is a β€œLightweight browser hot reload for Python ASGI web apps” I just implemented this on my thoughts website using fastapi , and it’s incredibly fast and lightweight. There just two lines of js that make a web socket connection back to the backend that watches for changes. When in development mode, this snippet gets injected directly on the page and does a refresh when arel detects a change. ``` const ws = new WebSocket("ws://localhost:5000/hot-reload"); ws.onmessage = () => window.location.reload(); ``` NOTE β”‚ This post is a thought . It’s a short note that I make about someone else’s content online #thoughts