This tool is used to sync your dev code to remote test server.
I'm a web developer. Sometimes wrote some php
scripts or backend templates.
These scripts have no need to compile, all i have to do is, copy to the test
server, refresh the webpage or use curl
to test the interface.
Below is how i do to copy the files to the remote test server:
scp -p 6666 test.php [email protected]:/var/www/app/
# then enter the remote server password
The copy step will be verbose when you edit very often. Type the scp command, then input the server password. Sometimes unacceptable!
What if i edited a file, some tool will help me copy to the test server without password? Sounds nice!
Node^6.9
sshpass
npm install -g easy-sync2
dev:
user: root
host: 192.168.0.2
port: 61209
password: xxxx
local-path: ~/app
remote-path: /var/www/app
test:
.
.
easy-sync -s -n dev # sync code
easy-sync -in dev
easy-sync -V
easy-sync -sn dev
easy-snc -l [sessionName]
easy-sync -S -name dev
# output : sshpass -p password ssh -p port user@host