diff --git a/README.md b/README.md index 311f84a..747235e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ working across different projects via [VisualMode](https://www.visualmode.dev/). For a steady stream of TILs, [sign up for my newsletter](https://visualmode.kit.com/newsletter). -_1826 TILs and counting..._ +_1827 TILs and counting..._ See some of the other learning resources I work on: @@ -1840,6 +1840,7 @@ If you've learned something here, support my efforts writing daily TILs by - [Rename A Bunch Of Files By Constructing mv Commands](unix/rename-a-bunch-of-files-by-constructing-mv-commands.md) - [Repeat Yourself](unix/repeat-yourself.md) - [Replace Pattern Across Many Files In A Project](unix/replace-pattern-across-many-files-in-a-project.md) +- [Restart Specific Overmind Process](unix/restart-specific-overmind-process.md) - [Reverse Each Line Of A File](unix/reverse-each-line-of-a-file.md) - [Run A Command Repeatedly Several Times](unix/run-a-command-repeatedly-several-times.md) - [Run A cURL Command Without The Progress Meter](unix/run-a-curl-command-without-the-progress-meter.md) diff --git a/unix/restart-specific-overmind-process.md b/unix/restart-specific-overmind-process.md new file mode 100644 index 0000000..b57d146 --- /dev/null +++ b/unix/restart-specific-overmind-process.md @@ -0,0 +1,40 @@ +# Restart Specific Overmind Process + +I have been in the bad habit of fully killing and re-running the entire +`overmind` process for a project whenever I have a new JavaScript file that I +need `vite` to pick up and bundle. `vite` is only one of three processes, so I'm +restarting two processes unnecessarily. + +```bash +❯ overmind status +PROCESS PID STATUS +web 50897 running +vite 50898 running +worker 50899 running +``` + +Instead, what I can do is specifically target the `vite` process for a +`restart`. + +```bash +❯ overmind restart vite +``` + +This will restart that specific process, ensuring that the new JS files get +picked up and bundled. + +I can clearly see that only `vite` was restarted by looking at the `status` +subcommand again. + +```bash +❯ overmind status +PROCESS PID STATUS +web 50897 running +vite 84163 running +worker 50899 running +``` + +Notice the `web` and `worker` processes still have the same PIDs, but `vite` has +a new much higher PID. + +See `overmind restart --help` for more details.