2025-04-18 16:10:44 +03:00

20 lines
735 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Live reload
## Server live reload
If running the server using `npm run start-server`, the server will watch for changes in `src/public` and trigger a frontend reload if that occurs.
## Electron live reload
Similarly, `npm run start-electron` supports live refresh  as well.
However, a core difference is that Electron watches `dist/src/public` instead of `src/public` since Electron runs on its own copy of the files.
To ameliorate that, a separate watch script has been implemented which automatically copies files from `src/public` to `dist/src/public` whenever a change is detected. To run it:
```
npm run
```
## Technical details
* This mechanism is managed at server level by watching for changes in`services/ws.ts`.