August 2024
Intermediate to advanced
186 pages
4h 3m
English
An ideal development environment will allow you to save changes to any of the files that comprise your project, using any editor or IDE, and have that automatically trigger restarting the local HTTP server and refreshing the browser tab where the app is running.
Let’s explore how this can be implemented when using the Bun JavaScript engine. The approach will differ for other tech stacks but could be similar.
We start the server with the following package.json script.
| | "dev": "bun run --watch src/server.tsx", |
The --watch flag causes Bun to automatically restart the server if any source file used by the server is modified. But this doesn’t refresh the browser tab where the app is running. One way to implement the browser refresh ...
Read now
Unlock full access