Watch a local path and sync to another location (for example a remote host on the network) via rsync.
Useful for developing on one machine while running the application on another one.
rsynchas to be installed on both machinesfswatchhas to be installed on local machine
- Clone repo
- Create a symlink in a directory that is part of $PATH. For example in
/usr/local/binand give it an alias for examplersync-watch
rsync-watch SOURCE DESTINATION [OPTIONS]--excludecomma-separated list of paths to ignore. This option will get passed to rsync and fswatch.
rsync-watch my-app-folder 192.168.1.1::desktop --exclude=my-app-folder/node_modules,my-app-folder/.envThis will sync the local folder my-app-folder to a remote host in the local network
with a virtual directory or module called desktop while ignoring all files in the
node_modules folder and the environment file.