Complete setup for local web development with automated file synchronization to remote server. This configuration allows you to:
- Develop locally with full IDE features and build tools
- Compile SCSS/JS assets locally
- Sync all changes (source files + compiled assets) to remote server via SSH
- No need for FTP/SFTP - works with SSH-only access
- Perfect for staging/live servers where you can't install Node.js
- File watcher that syncs changes in real-time
- Excludes source files and node_modules from sync
- Easy setup with npm scripts
- Works with any remote server accessible via SSH
Prerequisites: Node.js locally, SSH access to remote server
rsync -avz username@server:/var/www/html/ ./{
"scripts": {
"sync": "node sync-watcher.js",
"dev": "concurrently \"npm run watch\" \"npm run sync\"",
"download": "./download.sh",
"upload-all": "rsync -avz --progress --exclude='node_modules' --exclude='src' --exclude='.git' ./ username@server:/var/www/html/"
}
}