While I created this script for my development in React projects, you can change it to meet whatever needs suit you best. You can use this as is, or dare to make spicy changes!
GitHub with script and service file: https://github.com/YomenT/react-templ...
Commands:
Install the directory monitoring tool: sudo apt-get install inotify-tools
To make your script executable: chmod +x your_script.sh
Set up your new service:
systemctl --user daemon-reload
systemctl --user enable service-name.service
systemctl --user start service-name.service
To check status of service: systemctl --user status service-name.service