Custom service with hot-reload on code change #604
|
I'm not sure if this falls within the scope of this project, but I would like to have a custom service that runs my app's development server with hot reload (eg. on a code change inside the repository, the server automatically reloads). It would be nice to have this also running inside the process-compose TUI. I managed to setup my app's development server with services-flake, but the hot-reload doesn't work because it runs on a copy of the code in the nix store. Is there perhaps a reasonably elegant way to restart/rebuild my custom service derivation on a code change? Any tips or suggestions are welcome. |
Replies: 1 comment 1 reply
|
You simply need to put the dev server command into services command and make sure the CWD is set as needed so that it runs from source in the repo |
You simply need to put the dev server command into services command and make sure the CWD is set as needed so that it runs from source in the repo